This repository contains Java Tutorials.
Java is a popular, object-oriented programming language designed for portability across platforms ("write once, run anywhere").
Key features:
- Platform independence via the Java Virtual Machine (JVM)
- Strong typing and memory safety
- Rich standard library (collections, streams, concurrency, I/O, GUI, networking)
- Robust object-oriented design (classes, interfaces, inheritance, polymorphism, encapsulation)
- Automatic garbage collection
Files in this repo are numbered practice problems:
Basic JavatoAdvance Java(example exercises and hands-on assignments)
- Install JDK (Java Development Kit) 17 or newer.
- Open a terminal in this folder (
Java-Tutorial). - Compile a program:
javac Main.java
- Run the program:
java Main
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}- Use
javacto compile andjavato run. - Use IDEs (IntelliJ IDEA, Eclipse, VS Code) for easier editing, compiling, and debugging.
- Keep each class in its own file (named
ClassName.java) for larger projects.