but how to fix it when the requirement is to make non - static field and when I try to change main to be non static there is nullpointerexception