Computer Science, asked by JoyitaPurkait, 10 months ago

System.out.println("ACHIEVENT.replace('E','A')); System.out.println ("DEDICATE" COMPAREtO("DEVOTE"));

Answers

Answered by itsshreyas
1

Answer:

ACHIAVANT

-17

is the answer

Answered by amruthamanisai587
0

Answer:

here the replace function will replace all the "E"'s present the string are replaced by "A"

in the second statement you to change the case of compareto function you have to use it like compareTo() because java is case sensitive make sure you use the cases of letters correctly. and you will get a negative value because they are not same and lexicographically second string greater than first string

Explanation:

let me know if you want more about this

Similar questions