Maximal leverage with libraries
The fastest way to create a program is to use code that’s already written: a library. A major goal in Java is to make library use easier. This is accomplished by casting libraries into new data types (classes), so that bringing in a library means adding new types to the language. Because the Java compiler takes care of how the library is used—guaranteeing proper initialization and cleanup, and ensuring that methods are called properly—you can focus on what you want the library to do, not how you have to do it.