Solved

What Is the Output of the Code Snippet Given Below

Question 5

Multiple Choice

What is the output of the code snippet given below? String s = "abcdefghijkl";
Int i = 1;
Do
{
If (i > 2)
{
System.out.print(s.substring (1, i) ) ;
}
I++;
}
While (i < 5) ;


A) abcd
B) bcde
C) bcbcd
D) cdef

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions