Which of this method of class String is used to obtain a length
of String object?
What is the output of the below Java program with WHILE, BREAK
and CONTINUE?
int cnt=0;
while(true)
{
if(cnt > 4)
break;
if(cnt==0)
{
cnt++;
continue;
}
System.out.print(cnt + ",");
cnt++;
}
1,2,3,4
Compiler error
0,1,2,3,4,
1,2,3,4,