Hi !!
This is my for loop:
Shape[] shapes=new Shape[10];
for(int i=0;i<shapes.le ngth;i++)
{
System.out.prin tln("\n");
shapes[i].printState();
area+=shapes[i].area();
System.out.prin tln(area);
}
My problem is that when i put the System.out.prin tln() out of the for loop it doesn't run( won't print anything).I can't understand why is doing it??I would need some advise :) thanks
This is my for loop:
Shape[] shapes=new Shape[10];
for(int i=0;i<shapes.le ngth;i++)
{
System.out.prin tln("\n");
shapes[i].printState();
area+=shapes[i].area();
System.out.prin tln(area);
}
My problem is that when i put the System.out.prin tln() out of the for loop it doesn't run( won't print anything).I can't understand why is doing it??I would need some advise :) thanks
Comment