How does compareto work in java?
Answer / Kailash Chandra Singh
The `compareTo()` method is used by Comparable interface to compare two objects. It returns 0 if the objects are equal, a negative number if the current object comes before the passed object, and a positive number if it comes after.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is object data type?
what is the default value of a variable char?(If not assigned)
what are the oops concept in java explain with real time examples
24 Answers Accenture, Bosch, Consummate Technologies, CTS, Current Technologies, iNautix, Infosys, Kekran Mekran, QA InfoTech, RTRT, SofTech, Tech Mahindra, Thorogood, Timios, Wipro,
What are user defined exceptions?
whatis Home interface and Remoteinterface? with example?
What do you understand by classes in java?
Is 'null' a keyword?
they asked class A{} class B{} class c{} all the three class saved as a single file,there is no main method in the file and anothe class M.java class m { psvm(String args[]) { // here the parent class can access } }
2 Answers DNS, IPSR Solutions,
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
Explain parallel processing in java8?
What is polymorphism in java? What are the kinds of polymorphism?
What are the procedures?