 All code is written inside classes, and every data item is an object, with the exception of the primitive data types, (i.e.integers, floating-point numbers, boolean values, and characters), which are not objects for performance reasons.Java reuses some popular aspects of C++ (such as the method).