JavaBasics

Introduction to Java

Understand what Java is, its history, features, working architecture, and why Java is widely used in modern software development.

Introduction to JavaLink to this section

Java is a high-level, object-oriented, and platform-independent programming language originally developed by Sun Microsystems and currently maintained by Oracle. It is designed to build secure, scalable, and high-performance applications.

Java follows the principle "Write Once, Run Anywhere", which means a Java program can run on any operating system that supports the Java Virtual Machine (JVM).

What is Java?Link to this section

Java is a general-purpose programming language used to develop applications for desktops, servers, mobile devices, and the web. Unlike low-level languages, Java focuses on readability, maintainability, and security.

tip

Java is an excellent first language for students because it teaches strong programming fundamentals and object-oriented thinking.

History and Evolution of JavaLink to this section

Java was created by James Gosling and his team at Sun Microsystems in the early 1990s. Initially named Oak, it was later renamed to Java.

  • 1995 – Java officially released
  • 2004 – Java becomes open-source
  • 2010 – Oracle acquires Sun Microsystems

Why Java is Widely Used?Link to this section

Java remains one of the most demanded programming languages due to its reliability and versatility.

  • Platform independent execution
  • Strong memory management
  • Massive developer community
  • Used in enterprise-level systems

note

Java releases include LTS (Long-Term Support) versions that are preferred in enterprise environments.

Core Features of JavaLink to this section

Java offers multiple features that make it suitable for large-scale applications:

  • Object-Oriented: Based on classes and objects
  • Platform Independent: Uses bytecode and JVM
  • Secure: No direct pointer access
  • Multithreaded: Supports concurrent execution
  • Automatic Garbage Collection: Handles memory automatically

warning

Do not confuse Java with JavaScript. They are completely different technologies despite similar names.

Java Architecture: JDK, JRE, and JVMLink to this section

Java works through a layered architecture that ensures portability and security.

  • JDK (Java Development Kit): Tools to develop Java programs
  • JRE (Java Runtime Environment): Environment to run Java programs
  • JVM (Java Virtual Machine): Executes compiled bytecode

note

A system needs JRE to run Java programs, but JDK is required to develop them.

First Java ProgramLink to this section

Above is a simple Java program that prints text to the console:

Code Example: Hello World in Java

Explanation:

  • class HelloWorld → Defines a class
  • main() → Program execution starts here
  • System.out.println() → Prints output

warning

The class name and file name must be the same in Java, otherwise compilation will fail.

Real-World Applications of JavaLink to this section

Java is widely used across industries:

  • Android application development
  • Banking and financial systems
  • Enterprise web applications
  • Cloud-based backend services

Tip:

If your goal is Android or backend development, Java provides a very strong foundation.

tip

If your goal is Android or backend development, Java provides a very strong foundation.
Test Your Understanding
Question 1 of 5

Question: Who developed the Java programming language?