Given char a = “A”; What is the output? [2]
System.out.println (Character.isLetter(a));
System.out.println (((int)a+35));
System.out.println (String.valueOf(a).toLowerCase());
System.out.println ((char) ((int)a+2));
Answers
Answered by
0
Answer:
Input is "andna".
i1 will be 0 and i2 will be 4.
First loop iteration we will compare word[0] and word[4]. They're equal, so we increment i1 (it's now 1) and decrement i2 (it's now 3).
So we then compare the n's. They're equal, so we increment i1 (it's now 2) and decrement i2 (it's 2).
Now i1 and i2 are equal (they're both 2), so the condition for the while loop is no longer true so the loop terminates and we return true.
Explanation:
please make me Brainlist and thanks
Similar questions