Q. What is the output of the below Java code with a FOR loop?
Code:
for(int i=1; i<5; i++)
{
System.out.print(i +",");
}
β
Correct Answer: (A)
1,2,3,4,
for(int i=1; i<5; i++)
{
System.out.print(i +",");
}
You must be Logged in to update hint/solution