Java Basics Tutorials
Learn the fundamentals of Java programming including variables, data types, operators, and basic I/O.
Introduction to Java - History, Features & Usage
Get started with Java programming. Learn about Java history, key features, JDK, JRE, JVM, and why Java is one of the most popular languages.
First Java Program - Hello World Example
Writes your first Java program. Understand the class structure, main method, and how to compile and run Java code.
Variables in Java - Complete Guide with Examples
Learn about variables in Java with examples. Comprehensive guide covering variable types, declaration, initialization, and best practices.
Data Types in Java - Primitive & Reference Types Explained
Complete guide to Java data types. Learn about primitive types (int, double, boolean, char) and reference types with examples.
Operators in Java - Arithmetic, Relational & Logical
Master Java operators including arithmetic, assignment, comparison, logical, and ternary operators with examples.
Type Casting in Java - Widening and Narrowing
Understand type conversion in Java. Learn about implicit (widening) and explicit (narrowing) casting with examples.
Input and Output in Java - Scanner Class & System.out
Learn how to take user input using Scanner class and print output using System.out.println in Java.
Comments in Java - Single Line, Multi-Line & Documentation
Understand how to write comments in Java. Learn about single-line, multi-line, and Javadoc comments.
Keywords in Java - Reserved Words List
Complete list of reserved keywords in Java. Understand their meaning and why you cannot use them as variable names.
Java Naming Conventions - Classes, Methods & Variables
Learn standard Java naming conventions. Understand CamelCase, PascalCase, and SCREAMING_SNAKE_CASE best practices.
Structure of a Java Program - Explained
Understand the anatomy of a Java program. Learn about package declaration, imports, class definition, and main method.
Compile Time vs Runtime in Java
Difference between compile-time and runtime. Understand what happens during compilation and execution of a Java program.
public static void main(String[] args) - Explained
Detailed explanation of the Java main method syntax. Understand what public, static, void, main, and String[] args mean.
Difference between print() and println() in Java
Learn when to use System.out.print() vs System.out.println() and how to format output effectively.
Java Escape Sequences - Special Characters
List of escape sequences in Java strings. Learn how to print quotes, newlines, and backslashes.
Explore Other Categories
Practice What You Learn
Try out the code examples in our free online Java compiler.
Open Java Compiler