Java Tutorial · Revision notes

Java Introduction

Java is a high-level, class-based, object-oriented programming language designed to run on any device that has a Java Virtual Machine. This chapter explains what Java is, its features, history, the difference between JDK, JRE and JVM, the inside of the JVM, your first Hello World program and how to install Java.

Quick revision

  • Java = high-level, object-oriented, class-based language created by James Gosling at Sun (1991 Oak, 1995 Java, 1996 JDK 1.0).
  • Source (.java) -> javac -> bytecode (.class) -> JVM executes it (WORA).
  • Features: simple, OOP, platform independent, secure, robust, multithreaded, portable, high performance, distributed, dynamic.
  • JDK = JRE + development tools; JRE = JVM + libraries; JVM runs bytecode.
  • JVM parts: class loader, runtime data areas (heap, metaspace, stacks, PC), execution engine (interpreter, JIT, GC).
  • Heap is shared; stack is per thread; local variables on stack, objects on heap.
  • Entry point: public static void main(String[] args).
  • Install JDK, set JAVA_HOME, add bin to PATH, verify with java -version and javac -version.
Read the full Java Introduction notes on Doubtclip →