DEV Community

SILAMBARASAN A
SILAMBARASAN A

Posted on

JAVA INTRODUCTION

1. How Java Started (1991)

  • Java was created by James Gosling and his team at Sun Microsystems.

  • Initially, it was called Oak 🌳.

  • The goal: build software for electronics like TVs, set-top boxes.

2. Name Changed to Java (1995)

  • The name Oak was already taken β†’ changed to Java β˜•.

  • Inspired by coffee (Java coffee).

  • Officially released in 1995.

πŸ‘‰ Famous slogan:

β€œWrite Once, Run Anywhere” (WORA)
Means Java programs can run on any device using JVM.

πŸ”‘ Summary

  • Created in 1991

  • Released in 1995

  • Founder: James Gosling

  • Owned by Oracle today

  • Famous for: Platform independence

               ## ARCHITECTURE OF JAVA
    

πŸ”Ή 1. Java Source Code

  • You write code in a .java file πŸ‘‰ Example: Hello.java

πŸ”Ή 2. Java Compiler (javac)

  • Converts source code β†’ bytecode

  • Output file: .class

πŸ‘‰ Why bytecode?
Because it is platform independent

πŸ”Ή 3. Bytecode

  • Intermediate code (not machine code)

  • Can run on any system with JVM

πŸ”Ή 4. JVM (Java Virtual Machine)

πŸ‘‰ Most important part ⭐

  • Converts bytecode β†’ machine code

  • Executes the program

JVM Components:

  • Class Loader β†’ loads class files

  • Bytecode Verifier β†’ checks security

  • Interpreter β†’ executes code line by line

  • JIT Compiler β†’ converts to faster native code

  • Garbage Collector β†’ removes unused memory

Top comments (0)