i am doing a problem.the problems was that what do the following code prints
class printing{
public static void main(String[] args){
for(int i=1; i<=10; i++)
{
for(int j=1;j<=5;j++)
System.out.print("@");
System.out.print("");
}}
This code prints infinte "@" and after some second the printing starts to slow down.
when i do through the code by editing i come to known that first outer loops executes then it comes to inner loop and prints the char "@" 5times and then it goes to outer loop again and "i" becames 2 and then same proces repeats and j became 2 and due to System.out.print("") statement in the inner loop prints char "@" infinite time and slows after some time and if there is no System.out.print("") statment in the inner loop it then there is no infinte loop.this what i come to understand but i didnt understand that why it became infinite loop because of this System.out.print("") statement. Have your suggestion please