This is Element class:
public class Element {
private String elementName;
private int atomicNumber;
private String Symbol;
priv
you have only initialized the Element Array but never initialized its elements,
Element[] element = new Element[103];
element[0].setElementName("H");// this cause NPE as element[0] is null
You need to initialize the elements like below:
Element[] element = new Element[103];
element[0] = new Element();
element[0].setElementName("H");