hello m new here starting java can anyone guide me how ti initilize array of objects in java em receving java.lang.NULL pointer exception
choice=Integer.parseInt(JOptionPane.showInputDialog(null,"Enter choice"));
Patient pati[]=new Patient[49];
if(choice == 1)
{
pati[i].setdata();
pati[i].showdata();
count++;
}
if(choice== 2)
{
pati[count].update();
pati[count].showup();
}
}while(choice!=3);
}