Know the core libraries
Java differs from most other languages in that the number of classes and
interfaces in its standard libraries is very large. Many common tasks have
already been implemented by these libraries.
Advice to beginners might include:
- don't be too intimidated by the large number of classes.
Some are used often, but most are used relatively rarely.
- the most widely used packages are
- for working with data, see
- for graphical applications, see the Swing classes
(javax.swing, and so on).
- for server applications, see the
Java Server Page APIs.
- for other packages, you should skim through their documentation just to get an
idea of what is available. Later, when a specific need arises, you will often know
which packages might be helpful.
As well, the standard JDK libraries:
Implementing something which already exists in the libraries is probably
- are generally of high quality
often improve their performance over time
are widely used, and usually form defacto standards
Significant changes and additions to the standard libraries occur in
each major release, and it pays to keep current.
The Java 8 release includes:
- interfaces with static helper methods, and default methods
- functional interfaces (interfaces with a single method)
- lambda expressions
- method references
- for collections: streams, pipelines and aggregate operations
The Java 7 release includes:
The Java 6 release includes:
- type inference
- java.nio.file - new ways to interact with the file system
- multi-catch - catching multiple exceptions at once
- binary literals
The Java 5 release includes:
- the JConsole monitoring tool
- various Swing improvements
- an enhanced for loop
- and annotations
The Java 1.4 release includes:
- regular expressions
- logging services
See Also :