![]() ![]() ![]() ![]() |
| Topics this page:
|
|
|
![]() | ![]() ![]() ![]() |
|
Release Number | Comments | Release Date | # of Packages |
---|---|---|---|
“Oak” | James Gosling![]() ![]() ![]() | 1987 | |
Java 1.0a2 (alpha) | First introduced by Sun Microsystems as “the universal programming language designed for the Internet”. | March 1995 | |
Java 1.0 | January 1996 | 212 classes in 8 packages | |
Java 1.1 | This major revision gave us an enhanced ClassLib![]() ![]() ![]() | February 1997 | 504 classes in 23 packages |
Java 1.2 | This second major revision to the Java language specification is commonly referred to as Java 2.
It now also referred to as J2SE (Standard Edition) when Java 2 Enterprise Edition appeared.
This revision added a javac Just-In-Time (JIT) compiler with jdb and javadoc,
plug-ins to direct browsers to use a Java Runtime Environment (JRE) rather than the browser's JVM,
a CORBA ORB with an idltojava compiler,
collections (linked lists, dynamic arrays, and hash tablefsections),
Swing user interface with 2D, audio, and Accessibility components,
Security Policy files, Digital certificates and signed Java Archive (JAR) files.
v1.2 implements a new model for threads![]() | December 1998 | 1,520 classes in 59 packages |
Java 2 EE | The Java 2EE (Enterprise Edition) initiative order to move from Web publishing to Web enterprise information management, the Java 2 Standard Edition (J2SE) was augmented with a multi-tiered approach, separation of user interface and business logic, a global security model, a global transaction management model, and so on. Java 2 Enterprise Edition (J2EE) extended J2SE to enable development of enterprise information systems. Java 2 Platform, Micro Edition (J2ME) is geared toward development of applications for small devices (such as cell phones, pagers and Personal Digital Assistants). | June 1999 | - |
JDK 1.3 | Also called Java 2 because it is an upgrade to Java 1.2 under the Java 2 platform.
1.3.1_15 is the final release for this version. | April 2000 | 1,842 classes in 76 packages |
Java 1.4 | Provides regular expression support, Assertions,
Wrapper Objects ![]() | Feb. 6, 2002 | 2,991 classes in 135 packages |
Java 1.5 aka J2SE 5.0 aka "Tiger" | JMX for diagnostics
![]() ![]() | Sep. 30, 2003 | 3,500 classes |
Java 1.6 aka JDK 6.0 | - | Dec 11, 2006 | - |
Java 1.7 aka JDK 7.0 | Code name "Dolphin" | July 28, 2010 | Oracle acquired Sun in 2010. |
Java 1.8 aka JDK 8.0 | Code name ? | 2013 | - |
Many say that the next jump in the Java language is the Scala language, created by the developer of Java Generics, Martin Odersky (Professor at EPFL in Lucerne, Switzerland).
Scala uses the same compilation model as Java and .NET (separate compilation, dynamic class loading, etc.), but features functional programming concepts critical for tackling concurrency to achieve scalability.
Clojure is a dialect of Lisp that is dynamically compiled into JVM CLR.
Apache Harmony and Open JDK are open-source implementations of Java.
Rather than going to the
Current Release (6.0),
go to
Previous Release (5.0)
This Java Applet page tells you what version of Java is running on your browser
Get the Java2 SDK, Standard Edition and Create Your First Java Application
The IBM Java2 SDK (part of the Websphere SDK for Web Services v5.1 using the Eclipse IDE) is
still at Java 1.3.1 for Windows and
up to 1.4.1 for Linux
One of the frustrations with Java is its
backward and upward compatibility.
Code that works in one version of Java may not work in a newer version. ,
as shown in this Errata to the Deital book
| IDEs have their own compilers and tools,
| ![]() ![]() |
| ![]() ![]() ![]() |
|
// Sample app:
public static class welcomeAPP {
System.out.println(
System.out.flush(); |
args[0] is the first argument passed into from the command line.
Applets run within an internet browser (or AppletViewer during debugging). They are called from a web page using the "hooks" provided by being a subclass derived from the JApplet super (base parent/ancestor) class.
Name applet source files with suffix APPLET.java, such as “HelloAPPLET.java”.
public class HelloAPPLET extends java.applet.JApplet {
The java.applet package contains the Applet class which has abstract methods init, start, paint, stop, and destroy.
<html>
<applet code="HelloAPPLET.class" name="HelloApplet" alt="hover" archive="HelloAPPLET.jar, another.jar" width="300" height="45" /* applet window size in pixels. */ vspace="4" hspace="4" > <param name="str1" value="Hello"> <param name="num1" value="3"> </applet> <html> |
There are no commas between arguments.
To dynamically size and resize the applet on the screen, add this Javascript.
The Name= parameter is the handle used by other applets to communicate with it, using this code:
To flush the class cache during debugging, click Shift-Reload in the browser.
If an old browser tries to load an applet containing a method for a newer JDK it doesn't support, a NoSuchMethodError exception is thrown. So applets should anticipate this exception and provide an alternative method.
Servlet code use the service() method to to handle Servlet requests.
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
|
| ![]() ![]() ![]() |
| On-Line tutorials![]() ![]() ![]() ![]() ![]() ![]() ![]()
| ![]() ![]() ![]() |
|
How IDEs save time:
| ![]() ![]() ![]() |
|
| ![]() ![]() ![]() |
|
public class Home extends (is a) House {
Family inhabitants Pet theCat |
| ![]() ![]() ![]() |
![]()
The “x” in javax.swing indicates an 'extension" to the core Java libraries not supported by every implementation.
| ![]() ![]() ![]() |
|
Due to a bug in Communicator, you must hold down the shift key and then click the link to download class files.) | ![]() ![]() ![]() |
| Harvy and Paul Deitels' ![]() Fourth Edition for Java 1.3
The Errata
| ![]() ![]() ![]() |
| This I think is the best bargain: ![]() ![]() ![]() (O'Reilly: 1999) ![]()
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
|
In Java, the availability of a class' features to its subclasses are specified by one (and only one)
Access control keyword modifier (public, private, and protected).
The “private protected” keyword in JDK 1.0 has been deprecated.
The default (also called "package") modifier is assumed when no modifier is stated.
|
![]() |
Modifier keyword | Accessible to... | Note | UML |
---|---|---|---|
public | All objects within system. | allows other external classes to view the (applet) class or called by any object. It is used with main to establish the scope of access. Only one per class file. | + |
default/ | Instances of classes within the same package. | allows a variable to be seen within the class, and from elsewhere within the same package, but not from sub-classes that are not in the same package. | ~ |
protected | Instances of the implementing class and its subclasses. | methods and variables can only be used by code from classes in the same package and to inherited classes. A member designated as protected appears to be public to members of classes which are derived from that class and appears to be private in classes outside its package. | # |
private | Instances of the implementing class. | methods and variables can only be used by code from within the same class, not by an inherited class. So top-level (not inner) classes may not be declared private. | - |
Java does not support the C++ function to designate a friend of a class which has direct access to all the private and protected members of a member function (method) of another class or a stand-alone function.
In addition to keywords main, void,
static
defined above:
|
Object Scope Modifier keyword | Purpose |
---|---|
native | method bodies are found outside the JVM, usually in a library written in C++ or other low-level language. Native method declarations are ended with a semi-colon and not curly braces having no body, indicating that the implementation is not provided in the class. |
abstract | Abstract classes cannot be instantiated and must be overridden. Abstract functions do not have an implementation. classes and methods are not instantiated by the new constructor so that implementation is deferred to a subclass. The compiler requires a class to be abstract if any of its methods is abstract. However, an abstract class can have non-abstract methods. |
final (sealed) | defined in a superclass (or interface) a constant specified with an initial value that cannot be changed. Final classes can't be sub-classed (extended) and must be overridden by the implementing class. Such static variables are usually in upper case and referenced by the class name as a prefix. A final variable must have an initial value or may be initialized in every constructor. |
transient | variables are not stored as part of its object's persistent state. Such objects may implement the Serializable or Externalizable interfaces to have their state serialized and written to destinations outside the JVM by passing the object to the writeObject() method of the ObjectOutputStream class. |
volatile | variables might be modified asynchronously in multiprocessor environments. |
Class Modifier | Purpose |
---|---|
static | methods and variables are called class methods and variables because they are associated with the class itself rather than an instance of that class. Methods cannot be declared inside a static block. So static members and variables are referenced by class name rather than instance name. Inside a static method there is no this reference to an instance. Static methods can't be overridden. Static methods, variables, and blocks of code are created only once for all instances to share. |
static inner | have access to the static members of the enclosing class, even to those that are private. They do not have implicit reference to members of the instances of the enclosing class. |
member inner | (not static) can access all the members of the enclosing class, even if they are protected or private. |
local inner | specified within a method definition of the enclosing class. It cannot be declared as static, public, protected, or private. It can access local variables that are specified as final. |
Anonymous inner | are use just once and not again. They do not have a class name / constructors. They can access final local variables |
Unlike non-static nested classes,
static nested classes can be accessed without having an instance of the outer class.
Static nested classes do not have access to the instance variables and methods of the outer class.
The synchronized modifier is used to control access to critical code in multi-threaded programs.
| ![]() ![]() ![]() |
|
long[] squares; squares = new long[200]; for( int i = 0; i < squares.length; i++ ) { squares[i] = i + i; } |
Related:
![]()
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page ![]() Thank you! |