carpart cp cp ifcp equals(cp system out println("they're equal")this works because all objects in java are implicitly derived from the object class overloaded operators this is easythere are no overloaded operators in java in ++you can redefine +*=and most other operators so they behave differently for objects of particular class no such redefinition is possible in java insteaduse method such as add(primitive variable types the primitive or built-in variable types in java are shown in table table primitive data types name size in bits range of values boolean true or false byte - to + char '\ to '\uffffshort - , to + , int - , , , to + , , , long - , , , , , , to + , , , , , , float approximately - double approximately digits - to + significant digits + to significant unlike and ++which use integers for true/false valuesboolean is distinct type in java type char is unsigned and uses two bytes to accommodate the unicode character representation schemewhich can handle international characters the int type varies in size in and ++depending on the specific computer platformin java an int is always bits