o‘zing o‘rgan
Intro to Java Lesson 1 / 18
Pito

What is Java? Your first program

The language of Android, banks and Minecraft

Chapter 1. Basics 10 minutes Video 3 questions

Java is one of the most widely used languages in the world. Its motto: "Write once, run anywhere". Java code runs inside the JVM (Java Virtual Machine), so it behaves the same on Windows, Mac and Linux.

It powers 📱 Android apps, 🏦 banking systems, 🎮 Minecraft (Java Edition) and big company servers.

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, world!");
    }
}
// Output: Hello, world!

It looks wordy, but the template is always the same: - class Main — every Java program lives inside a class - main — the program starts here - System.out.println(...) prints one line

Variables

String name = "Jasur";
int age = 15;
double score = 4.5;
boolean active = true;
System.out.println(name + " is " + age);
// Output: Jasur is 15

💡 The file name must match the class name: Main → Main.java.

📚 Free resources

Video lesson

Check yourself

Question 1 / 3

Which method does a Java program start from?

Choices

Question 2 / 3

What is the JVM?

Choices

Question 3 / 3

Which statement prints a line?

Choices