Introduction to Java

What is Java, JVM, JDK, JRE and how Java programs run.


Java is a high-level, class-based, object-oriented programming language designed to have as few implementation dependencies as possible. The Java Virtual Machine (JVM) runs compiled bytecode, making Java platform independent. JDK (Java Development Kit) contains JRE + development tools like javac and java. JRE (Java Runtime Environment) contains the JVM and standard libraries. The typical compile-run cycle is: .java source -> javac -> .class bytecode -> JVM -> running program.

Example
public class Hello {
  public static void main(String[] a) {
    System.out.println("Hello Java");
  }
}
Video Lesson Open in new tab
Quiz
1. Which component of Java translates source code into bytecode?
2. What does JVM stand for?
Coding Problems
1. Write a Java program to print "Hello, World!" to the console.
Discussion

Login to join the discussion.


No comments yet.