How many times does the following loop execute?
Int upperCaseLetters = 0;
String str = "abcdEfghI";
Boolean found = false;
For (int i = 0; i < str.length() && !found; i++)
{
Char ch = str.charAt(i) ;
If (Character.isUpperCase(ch) )
{
Found = true;
}
}
A) 9 times
B) 8 times
C) 5 times
D) 1 time
Correct Answer:
Verified
Q98: What is the output of this code
Q99: What will be the output of the
Q100: What does the following code snippet display?
Q101: In the following code snippet, when does
Q102: What is the output of this loop?
Int
Q104: Which of the following conditions can be
Q105: What is the first and last value
Q106: How many times does the following loop
Q107: For which input values will the following
Q108: Which of the following loops will print
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