English

The output of the statement "talent". compareTo("genius") is ______.

Advertisements
Advertisements

Question

The output of the statement "talent". compareTo("genius") is ______.

Options

  • 11

  • -11

  • 0

  • 13

MCQ
Fill in the Blanks
Advertisements

Solution

The output of the statement "talent". compareTo("genius") is 13.

Explanation:

ASCII value of 't' - ASCII value of 'g' = 116 − 103 = 13.

shaalaa.com
  Is there an error in this question or solution?
2023-2024 (March) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×