Loading
What is Java?

Java is a high-level, object-oriented programming language designed for building a wide range of applications. Developed by James Gosling in 1995 at Sun Microsystems (now Oracle), Java is famous for its "Write Once, Run Anywhere" principle. This means you can write your code once, and it will run on any platform that has a Java Virtual Machine (JVM).


Key Features of Java

  • Platform Independent:  Runs on Windows, Mac, Linux, and more no code changes needed.
  • Object-Oriented:  Everything is organized around classes and objects.
  • Secure & Robust:  Strong memory management and built-in security features.
  • Multithreading:  Easily handles multiple tasks at the same time.
  • Huge Community Support:  Millions of developers worldwide, tons of libraries and frameworks.


How Does Java Work?

  • Write Code:  You write your program in a .java file.
  • Compile:  The javac compiler turns your code into bytecode (.class file).
  • Run on JVM:  The Java Virtual Machine (JVM) runs the bytecode on any operating system.

Note: You don’t need to memorize the code execution process. The Java compiler and JVM handle it for you!


Your First Java Program

Here is a simple Java program that prints "Hello, Java!" to the screen:

//First Java Program
public class HelloJava {
    public static void main(String[] args) {
        System.out.println("Hello, Java!");
    }
}


Output:

Hello, Java!


Where is Java Used?

Java powers many real world applications, including:

  • Web Development:  Frameworks like Spring Boot and Hibernate
  • Android Development:  Apps built with Java and Kotlin
  • Enterprise Software:  Banking systems, CRM, ERP solutions
  • Game Development:  Popular games like Minecraft and Runescape
  • Cloud & Big Data:  Technologies like Hadoop and Apache Spark


Two Minute Drill

  • Java is powerful and object oriented.
  • Write once, run anywhere with the help of JVM.
  • Secure and reliable with automatic memory management.