Java Family

Year Ver Code Name Description
1995 1.0 Java Applets
1977 1.1 Java Event, Beans, Internationalization
Dec 1978 1.2 Java 2 J2SE, J2EE, J2ME, Java Card
2000 1.3 Java 2 J2SE 1.3
2002 1.4 Java 2 J2SE 1.4
2004 1.5 Java 5 J2SE 1.5
Nov 2006 6 Java 6 Open-Source Java SE 6. “Multithreading” by Doug Lea
May 2007 OpenJDK free software
2010 Oracle acquired Sun
Jul 2011 7 Java 7 “Dolphin”
Mar 2014 8 Java 8 Lambda Function

Javac: Java Compiler

Java Distributions:

1. JDK (Java Developer Kit )
◇JRE & Javac & tools

2. JRE (Java Runtime Environment)
◇ JVM & core class libraries
◇ Windows / Mac / Linux

Java is Object-Oriented Programming (OOP):
1. Class
public class Employee {

public int age;
public double salary;

public Employee () { [<– constructor with no arg]
}

public Employee (int ageValue, double salaryValue) { [<- constructor with args]

age = ageValue;
salary = salaryValue;

}
}

2. Construct = create / instantiate objects from the Class template.

3. Constructor : used to construct an object
◇ Every class must have at least 1 constructor (default add one by compiler)
◇ Same name as the Class
◇ It is like a Method without return value.

3. Method
returnType methodName (args)

returnType : primitive | object | void

void : (method returns nothing)

Examples:
♡ Primitive : int

int add (int a, int b)

♡ Object : Address

Address getAddress ()

◇ Void
(Special Method)

public static void main (String [] args)

static members are not tied to class instances. The method main acts as the entry point to a class, is static because it must be called before any object is created (instantiated).

Naming Conventions:
◇ Class: Employee , Address
◇ Fields: firstName, maxAge, blockNumber…
◇ Method: getAddress ()

Advertisements

One thought on “Java Family

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s