This is Element class:
public class Element {
private String elementName;
private int atomicNumber;
private String Symbol;
priv
You need to create objects. You just created array of object references.
Element[] element = new Element[103];
for(int i=0; i<103; i++) {
element[i] = new Element();
}
As your element is object (arrays are object) and it is stored on heap. All Element object references are initialized to null value. Due to which you are getting NPEs.
Element[] element = new Element[103];
element[0].setElementName("H"); // element[0] is null