English

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

Advertisements
Advertisements

Question

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

Options

  • 11

  • -11

  • 0

  • 13

MCQ
Fill in the Blanks

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 (February) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×