Computer Science, asked by humblestudent, 1 year ago

in 2016 icse paper... question 3 a ii) goes like give output of the following:
"CABLE". compareTo ("CADET")
and
answer is -3
how did they get that answer ????

Answers

Answered by manasvini
2
Compare to compares the numeric value and subtracts given from inputed text
Answered by oswin
1
but the answer will be -2


humblestudent: yeah? but in the answer key it is -3
humblestudent: anyway thank you
manasvini: r u icse
oswin: yes
humblestudent: yes manasvini
humblestudent: I m icse
manasvini: oh k
Similar questions