Loading

What is Java ?

Java is a high-level, object-oriented programming language used for building a wide range of applications. Created by James Gosling in 1995 at Sun Microsystems (later acquired by Oracle), Java follows the "Write Once, Run Anywhere" (WORA) principle, meaning Java programs can run on any platform with a Java Virtual Machine (JVM).

Features

  • Platform Independent → Runs on Windows, Mac, Linux without modification.
  • Object-Oriented → Everything in Java is based on classes and objects.
  • Secure & Robust → Strong memory management & built-in security features.
  • Multithreading → Supports multiple tasks running simultaneously.
  • Huge Community Support → Millions of Java developers worldwide.

How Does Java Work ?

Java Code Execution Process:

  • Write Code → Java code is written in a .java file.
  • Compile → The javac compiler converts it into bytecode (.class file).
  • Run on JVM → Java Virtual Machine interprets the bytecode & runs it on any OS.


NOTE: Above 'Java Code Execution Process' need not to learn it is done by the compiler itself. 

First Java Program

Here’s a simple Java program to print "Hello, Java!"
// My First Java Program public class HelloJava { public static void main(String[] args) { System.out.println("Hello, Java!"); } }


Output:

Hello, Java!                                


Real-World Applications of Java

Java is used in various domains, including:

  • Web Development - Spring Boot, Hibernate
  • Android Development - Kotlin & Java
  • Enterprise Software - Banking, CRM, ERP
  • Game Development - Minecraft, Runescape
  • Cloud Computing & Big Data - Hadoop, Apache Spark

Two Minute Drill

Java Overview
A powerful, object-oriented language for cross-platform applications.
Key Concepts:
  • Object-Oriented: Everything in Java revolves around objects.
  • Platform-Independent: Write once, run anywhere.
  • Secure & Reliable: Automatic memory management and high-level security.