Write the output of the following String methods: String x="Galaxy",y="Games"; (a) System.out.println(x.charAt(0)==y.charAt(0)); (b) System.out.println(x.compareTo(y));
Advertisements
Question
Write the output of the following String methods:
String x="Galaxy",y="Games";
(a) System.out.println(x.charAt(0)==y.charAt(0));
(b) System.out.println(x.compareTo(y));One Line Answer
