Every variable is an object in the class hierarchy and has a set of predefined methods, or functions, that can be used to operate it. The object model lets you define data structures corresponding to real-life objects, making the translation between what a program has to do and how it's implemented transparent. Java's built-in class hierarchy has six major classes, or packages. To use any object in any package, you simply include that package in your declarations. You also have full inheritance in the class hierarchy.
Any object instantiated from deep in the hierarchy has access to all the methods defined higher up.
The advantage is speed of development and code maintainability. Much development involves modifying code from the existing class libraries, rather than creating new structures. That promotes reuseability. The object-oriented approach also encourages a natural program structure, making it highly readable and easy to modify.