Thus, a data type defines precisely what sort of operations can be applied to that data.To support the principles of object-oriented programming, all OOP languages, including Java, have three traits in common: encapsulation, polymorphism, and inheritance.