Compare To method overview

  • Eclipse: Oxygen
  • Java: 1.8

This is a very useful method in Java. The compared to methods are used to compare TWO OBJECTS and not two primitive datatypes. The output of the compared to the method is explained on the basis of some arguments. If we want to compare two primitive datatypes we have to use Wrapper Class as studied earlier and convert it to objects.

Output

1

Contributed by: Poonam Tomar


VIEW COURSES

Buy me a coffee!

 

PayTM QR (INDIA)

  • Get video tutorials
  • Project files set
  • Get┬áCertified

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu