हिंदी

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
Advertisements

प्रश्न

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

उत्तर

  1. true
  2. -1
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (March) Specimen Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×