Java Introduction

</>Coding Tamilan.← Java course & curriculum
Java Masterclass · Lesson 01 / 50 · English

Java Introduction

A small program. A new way to solve problems.

Step-by-step explanationsRunnable JavaPractice + answer

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.
01 / The concept

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.

02 / Step by step

Explore the details

From source code to output

1. WriteCreate a .java source file.
2. Compilejavac checks and compiles the source into bytecode.
3. RunA compatible JVM executes the program.

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.

03 / Read and predict

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.

Main.java · complete runnable exampleJAVA
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.

04 / Learn by changing

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.

Open Java editor ↗
After the editor loads, choose Load this lesson example, then press RUN.

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.

05 / Your turn

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.

Coding Tamilan · Understand the idea. Try the code. Build the habit.