Java versions


The numbering of Java SE version has modified gradually, and it is a bit confusing. The first versions were numbered 1.0 and 1.1. For marketing purposes they were called "Java 1".

The following version had a number 1.2 and was split into three parts: Standard Edition, Enterprise Edition, Micro Edition. For marketing purposes it was called "Java 2"; the Standard Edition, Enterprise Edition, and Micro Edition were called "J2SE", "J2EE", "J2ME".

Let's focus on the Standard Edition only. The following versions 1.3, 1.4, and 1.5 had rather confusing marketing names "J2SE 1.3", "J2SE 1.4", and "J2SE 5.0".

The versions 1.6 and 1.7 were called reasonably "Java SE 6" and "Java SE 7".

Summary: To avoid confusion, it is better to use the numbers from 1.0 to 1.7. This is also how the versions are called within the Java source code.

Java SE versions

Java 1.0 was published in 1996. It was the core of the programming language; it allowed creating a simple application or a web applet. This version was very slow, because the algorithms for sufficiently quick memory management were not developed yet. (At that time, Java has gained an image of a slow language, although this was not true for the following versions.)

Java 1.1 supported inner classes. Database tools, remote method invocation, beans, and introspection were added. Microsoft added Java support to MS Internet Explorer, but violated the licence agreement. (The remote object invocation methods were removed, and new methods specific for MS Windows were added instead. Which means that the programmers who would use any of these methods in their programs, would lock themselves to the MS Windows operating system, despite the "write one, run everywhere" Java slogan.) After a lawsuit, Microsoft removed Java from their web browser completely.

Java 1.2 was split to Java Standard Edition (simply: the Java for desktop applications and web applets), Java Enterprise Edition (Java SE plus web application tools), and Java Micro Edition (simplified Java with mobile tools); further here only the Java SE is described. Graphical user interface Swing, collections, and "strictfp" keyword were added. Since the MSIE web browser did not support Java by default anymore, Sun created web browser plugin and their own just-in-time compiler.

Java 1.3 included some more libraries.

Java 1.4 included regular expressions, logging, XML and XSLT, "assert" keyword, and other improvements.

Java 1.5 introduced a few major changes. In the language syntax generic types, annotations, enumerated types, a new iterator-based "for" cycle syntax, and static import were added. The primitive types are automatically converted to objects and vice versa (autoboxing, autounboxing). A concurrent programming library was added.

Java 1.6 introduced scripting languages support, web services, JDBC, et cetera.

Java SE 1.7

When creating a generic instance, it is not necessary to specify the parameter types explicitly, as they can be inferred from the variable type.

List<String> strings = new ArrayList<>();

A new variant of the "try" keyword, called "try with resources" can take as parameters a few variables containing "AutoCloseable" objects, and safely close there objects under many circumstances (no exception, caught exception, uncaught exception, object intialization failed). This simplifies code containing many objects which need to be closed, such as database resources.

Binary literals:

int i = 0b00001010;

It is possible to use underscore signs to separate digits in large numbers, integer or decimal.

int MILLION = 1_000_000;