This is Element class:
Element
public class Element { private String elementName; private int atomicNumber; private String Symbol; priv
You have not initialized element[0] . You need to initialize it first, in fact every array element if you intent to use them.
element[0]
element[0]=new Element();
or you can initialize all of them using loop
for(int i=0;i