Q. What is the output of Java Enhanced FOR loop below?
Code:String names[] = {"MOGLI", "SHAREKHAN", "BALU"};
for(String str: names)
{
System.out.print(str + ",");
}
β
Correct Answer: (C)
MOGLI,SHAREKHAN,BALU,
String names[] = {"MOGLI", "SHAREKHAN", "BALU"};
for(String str: names)
{
System.out.print(str + ",");
}
You must be Logged in to update hint/solution