Computer Science, asked by MELSON, 1 year ago

give the output:"CABLE".compareTo("CADET")

Answers

Answered by IshikaHada
5
False...output will be false

MELSON: I am sorry,but you are wrong the answer is -3 but i don't know how
IshikaHada: Let me see in my book
IshikaHada: Of which chapter this qus is
MELSON: string
IshikaHada: Answer will be -ww
IshikaHada: Sorry -2
Answered by Riyuuuuu
18
answer will be -2....
I hope it will help you!!!

MELSON: how?
Riyuuuuu: value of D in ascii code is 68 and value of B in ascii code is 66 so B -D = 66-68=-2
MELSON: but its answer is -3
Riyuuuuu: From where have u seen it
Riyuuuuu: plz come in inbox
MELSON: from www.aplustopper.com
Similar questions