Posts by Caio Noronha • 1 point
1 post
-
-1
votes1
answer432
viewsQ: How to resolve Exception in thread "main" java.lang.Nullpointerexception error in my program?
public class ClassMain { public static void main(String[] args) { CPessoa[] Pessoas = new CPessoa[10]; int cont=0, j=0; for(int i=0; i<10; i++){ Pessoas[i] = new CPessoa(Pessoas[j].nome, cont); }…
javaasked Caio Noronha 1