Java Tutorial

Java tutorial for beginners and professionals with examples on Basics, OOPs, Methods, Overloading, Overriding, Inheritance, Polymorphism, Interfaces, Packages, Abstract classes, String handling, Exception handling, IO, Collections, Multithreading, Serialization and more.

We are going to start learning Java, which is a programming language. So, let us have a brief look at programming language first.

What is language?

A way of communication is known as language. e.g. Hindi, English, etc.

What is a Program?

A set of instructions which is used to perform a specific task.

What is a Programming Language?

An artificial language is used to write programs that can be translated into machine language and executed by computer with the help of some special software.

What is a Platform?

Dictionary meaning: A raised level surface on which things can stand.

In programming: Hardware or software on which a program can execute/run.

e.g. – c, c++, Java etc.

What is Java?

Java is a high-level programming language and is also known as the platform because of its JRE (java runtime environment).

Brief History of Java.

Java language project was initially started in June 1991 by James Gosling, Mike Sheridan, and Patrick Naughton. An oak tree stood outside Gosling’s office at that time and java was named as oak initially. It was later renamed Green and was later renamed Java from Java Coffee.

The base concept of Java language project.

Write once, run anywhere (WORA) – that means Java program can run anywhere and on any platform. When Java code is compiled it is converted into byte code. Now only this byte code is needed to run using JVM, no need for source code and recompilation.

Java released versions:

  1. JDK Alpha and Beta (1995)
  2. JDK 1.0 (23rd Jan, 1996)
  3. JDK 1.1 (19th Feb, 1997)
  4. J2SE 1.2 (8th Dec, 1998)
  5. J2SE 1.3 (8th May, 2000)
  6. J2SE 1.4 (6th Feb, 2002)
  7. J2SE 5.0 (30th Sep, 2004)
  8. Java SE 6 (11th Dec, 2006)
  9. Java SE 7 (28th July, 2011)
  10. Java SE 8 (18th March, 2014)
  11. Java SE 9 (21th Sept, 2017)
  12. Java SE 10 (20th March, 2018)
  13. Java SE 11 (25th Nov, 2018)
  14. Java SE 12 (19th March, 2019)

Java Tutorial:

Java Examples:

 

Java Cloning:

Java String:

Java String Handling:

Java String Buffer Tutorial:

Java String Builder Tutorial:

Java String Tokenizer:

 

 

Java Exception Handling Tutorial:

Java Multithreading Tutorial:

Java Multithreading Tutorial

Java Concurrency Tutorial:

Java Collection Tutorial:

 

 

LinkedList:

 

Hashtable:

 

Hashset:

 

Treeset:

 

Set:

 

Hashmap:

 

Treemap:

 

List:

 

Java Runtime Tutorial:

Java Input Output Stream Tutorial:

Java Array:

Vector:

 

JavaFx:

 

jFrame:

jLable: