Java Tutorial
Learn Java from the ground up, from your first program to object-oriented programming, with examples and outputs on every page.
Java is a high-level, class-based, object-oriented programming language. It was designed so that programmers can write once, run anywhere (WORA): compiled Java code runs on any platform that has a Java Virtual Machine (JVM), without being recompiled.
This tutorial is for beginners and for students preparing for exams and interviews. Each lesson explains one concept, shows a complete program, and gives its output.
Your First Java Program
public class Main {
public static void main(String[] args) {
System.out.println("Hello, Java!");
}
}
Hello, Java!
What You Will Learn
IntroductionWhat Java is and where it is used
FeaturesWhy Java is so popular
JDK, JRE & JVMHow Java code runs
Variables & Data TypesStoring values
Control Statementsif-else, switch, loops
OOPs ConceptsClass, object, inheritance…
Exception Handlingtry, catch, finally
Prerequisites
You don't need any programming experience. Knowing basic computer use (files, folders, a text editor) is enough.
TipType every example yourself rather than copying it. You'll remember syntax much faster.
Track your progress through the Java course