I am tryıng to create new object of other class ın a for loop. like
for(int i =0;i<10;i++){
Computer p1=new Computer(10,20);
}
and when I try anywhere to reach p1.someAction(); it say you must declare p1. But if I declare it on top of program how can I create again in loop? I also try only Computer p1; but it gave exeption ..