Java Introduction
A small program. A new way to solve problems.
Read this topic in தமிழ் ↗.
By the end of this lesson, you can…
- Explain the key idea behind Introduction.
- Read and run a complete example, then predict what changes.
- Recognize the topic-specific mistake discussed below.
Understand the idea
A program is a precise set of instructions. Java source is compiled into bytecode, which a compatible JVM executes. Separate the language, the compiler, and the runtime in your mental model. You write the instructions; the tools turn them into something the computer can execute.
Explore the details
From source code to output
Java is used in backend services, command-line tools, and many other applications. The beginner examples in this course use a conventional class-based main method. Modern Java also has simpler entry-point forms; begin with one clear form and build from there.
A complete runnable example
This complete Main.java program focuses on the lesson idea. Reference fragments above may demonstrate individual statements; this example includes the imports, entry point, and supporting types it needs.
public class Main {
public static void main(String[] args) throws Exception {
System.out.println("Vanakkam, developer!");
System.out.println("One small program is a good start.");
}
}Predict first. Then reveal the expected output / வெளியீடு
Vanakkam, developer! One small program is a good start.
The output shown was checked by running this complete example. Trace the executed statements in order, then compare with your run.
Change it. Run it. Understand it.
Load this lesson example into the editor. Change one value or statement, predict the result, then press RUN to execute Java.
Powered by OneCompiler. Code you run is sent to OneCompiler for execution. For Scanner examples, supply input in the editor I/O panel; for file examples, files exist in its execution environment.
Make it your own
Practice challenge
Replace the greeting and add one more line about something you want to build.
Reveal the answer and reasoning / விடை
Use another System.out.println("…"); statement inside main. Each println creates a new output line.
One mistake to avoid: Do not confuse Java with JavaScript. They are separate languages with different runtimes and ecosystems.
Your learning checkpoint
- Explain the example without reading the output first.
- Make the change requested in the practice task.
- Describe why the result changed—or why compilation failed.
Ready to move on? Follow the next lesson in course order, or return to the curriculum to review a prerequisite.