Computer Science, asked by Waqarg5229, 11 months ago

(ii) "TRANSPARENT".compareTo("TRANSITION")

Answers

Answered by alinakincsem
8

Answer

A positive integer ( greater than 0 )

Explanation

The Java String compareTo() method is used for comparing two strings alphabetical order. It return integer value. If both the strings are equal then this method returns 0 else it returns either positive or negative value.

The statement "TRANSPARENT".compareTo("TRANSITION") will return a positive integer because the first string is alphabetically greater than the second string.

Answered by Hansika33
20

Answer:7

Explanation:ascii value of P minus ascii value of I i.e. 80-73=7

Similar questions