Computer Science, asked by nidhimaddhesiya17, 3 months ago

Determine output:
public class Testi
public static void main(String args[]) {
String s1 = "SITHA";
String s2 = "RAMA";
System.out.println(s1.charAt(0) > s2.charAt(0));
}
1
A TRUE
B FALSE
С О
D Compilation error​

Answers

Answered by majirouvik
1

Answer:

TRUE

Explanation:

s1.charAt(0) = S = 83 (ASCII)

s2.charAt(0) = R = 82 (ASCII)

Obviously 83 is > 82

P.S.- Make me brainliest!

Answered by MrTSR
1
  • You missed curly braces after Testi and at the end.
  • If you put curly braces then your output will be true.

This will give Compilation error​.

Similar questions