Question: How many times will the following do-while loop be executed? int x = 11; do { x += 20; } while (x > 100); For
How many times will the following do-while loop be executed?
int x = 11;
do
{
x += 20;
} while (x > 100);
For the following code, what would be the value of str[2]?
String [ ] str = {abc, def, ghi, jkl};
What will be displayed after the following code has been executed?
String str1 = The quick brown fox jumped over the lazy dog.;
String str2 = str1.substring(20,26);
What will be the result of the following code:
int[ ] numbers = {40, 3, 5, 7, 8, 12, 10};
int value = numbers[0];
for (int i=1; i< numbers.length; i++)
{ if (numbers[i] < value)
value = numbers[i];
}
What will be the result of the following code:
Int[ ] numbers = {40, 3, 5, 7, 8, 12, 10};
int value = 0
; for (int i=1; i< numbers.length; i++)
{ if (numbers[i] < value)
value += numbers[i];
}
What does the following code do:
String str = abc456;
char chr = str.charAt(2);
If (Character.isLetter(chr))
System.out.print(Character.toUpperCase(chr));
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
