☕ The Java Universe ☕

Learn Java — object-oriented programming for apps, games, and more! 🚀

💡 What Is Java?

Java is a class-based, object-oriented programming language that is widely used in web, mobile, and desktop applications.

“Write once, run anywhere.”

🧩 Basics

Variables, types, and simple operations:


int age = 15;
String name = "Dyl";

System.out.println("Name: " + name);
System.out.println("Age: " + age);
  

⚙️ Methods

Functions in Java are called methods:


public static String greet(String user) {
    return "Hello, " + user + "!";
}

System.out.println(greet("Dyl"));
  

🔁 Loops

Java loops let you repeat tasks:


for(int i = 0; i < 5; i++) {
    System.out.println("Loop " + i);
}
  

🕹️ Try Java Yourself

Type your Java code below and click “Run Code”.

Output will appear here...

*Simulated Java output (real compilation requires server-side setup)