You are getting the NullPointerException (NPE) in one of your loops in the PersoanaList
class. For example:
public boolean cautare(String a,int b){
boolean check=true;
for(int j=1;j<=perslist.length;j++)
{
if(perslist[j].getNume().equals(a) && perslist[j].getPin()==b)
Since unless you've completely filled your perslist
variable, you'll hit an array item that is null, giving you a NPE when .getName()
is called.
After you fix that though, you'll probably hit an ArrayIndexOutOfBoundsException since you are using 1 to n for your array indices. Arrays start at 0 and go to n-1. So for 20 array items, you would reference them as 0 to 19.