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:
Verified
Q45: Which of the following loops executes the
Q73: What for loop can be used in
Q74: How many times does the following loop
Q75: What is the output of the code
Q76: Which loop does not check a condition
Q77: What is the output of the code
Q79: What is the result when the following
Q81: What is the output of the code
Q82: Storyboards are a helpful part of the
Q83: What will be the output of the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents