Java தொடங்கலாம் — தமிழ்

</>Coding Tamilan.← Java course & curriculum
Java Masterclass · Lesson 02 / 50 · தமிழ்

Java தொடங்கலாம்

Set up once. Run your first program.

Step-by-step explanationsRunnable JavaPractice + answer

முக்கிய விளக்கங்கள் தமிழில் உள்ளன. Runnable example மற்றும் கூடுதல் practice notes ஆங்கிலத்தில் உள்ளன.

இந்தப் பாடத்தில்…

  • Explain the key idea behind Getting Started.
  • Read and run a complete example, then predict what changes.
  • Recognize the topic-specific mistake discussed below.
01 / The concept

அடிப்படையைப் புரிந்துகொள்ளுங்கள்

For local development, install a JDK, which includes the tools needed to compile and run Java. Confirm both java -version and javac -version in a fresh terminal. Save the example as Main.java, compile with javac Main.java, and run with java Main from the directory containing the compiled class. The browser editor below provides a separate environment; it does not install Java on your computer.

02 / Step by step

விரிவான விளக்கங்கள்

Java-வை தொடங்கலாம்

Coding Tamilan-ல Java-வை எந்த installation-உம் இல்லாம try பண்ணலாம்.

நம்ம Online Java Editor browser-லயே ரன் ஆகும் — code-உம் result-உம் ஒரே நேரத்துல பாக்கலாம்:

இந்த editor-ஐ tutorial-ல எல்லா examples-க்கும் use பண்றோம்.

Java Install பண்றது எப்படி?

உன்னோட computer-ல Java install பண்ணணும்னா கீழே இருக்குற steps follow செய்யவும்.

சில PC-கள்ல Java already install ஆகியிருக்கும்.

Windows-ல Java இருக்கான்னு check பண்ண Command Prompt-ல இதை type செய்யவும்:

Example

Java reference fragmentJAVA
C:\Users\Your Name>java -version

Java இருந்தா version number show ஆகும்.

Java இல்லன்னா oracle.com-ல download பண்ணிக்கோ.

குறிப்பு: IntelliJ IDEA, Netbeans, Eclipse மாதிரி IDE use பண்ணலாம் — பெரிய projects-க்கு மிகவும் useful.

Java Quickstart

Java-ல எந்த program-உம் ஒரு class-ல ஆரம்பிக்கும். Class பேரும் file பேரும் ஒண்ணாத்தான் இருக்கணும்.

Main.javaன்னு file create செய்யவும் — Notepad மாதிரி எந்த text editor-லயும் செய்யலாம்.

கீழே இருக்குற code-ஐ எழுது — "Hello World" print ஆகும்:

Code-ஐ இப்போ முழுசா புரிஞ்சுக்கணும்னு இல்ல — பிறகு detail-ஆ பார்க்கலாம். எப்படி run பண்றதுன்னு மட்டும் கவனி.

File-ஐ "Main.java"-ன்னு save செய்யவும். Command Prompt-ல file இருக்குற folder-க்கு navigate பண்ணி இதை type செய்யவும்:

Example

Java reference fragmentJAVA
C:\Users\Your Name>javac Main.java

Compile ஆகும். Error இல்லன்னா next line-க்கு போகும். இப்போ run பண்ண:

Example

Java reference fragmentJAVA
C:\Users\Your Name>java Main

Output-ல "Hello World" தெரியும்.

Congrats! உன்னோட first Java program எழுதி run பண்ணிட்ட!

Java reference fragmentJAVA
// Main.java — இந்த file-ஐ save பண்ணி compile மற்றும் run செய்யவும்
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
// Compile: javac Main.java
// Run:     java Main
// Output:  Hello World

Java program-ஐ compile செய்ய எந்த command பயன்படுத்துவோம்?

  1. java Main.java
  2. javac Main.java
  3. run Main.java
  4. compile Main.java
Reveal answer / விடை

javac Main.java

`javac` என்பது Java Compiler. இது .java file-ஐ .class (bytecode) file-ஆக மாற்றும். பிறகு `java Main` என்று run செய்யலாம்.

03 / Read and predict

முழுமையான உதாரணம்

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("My Java setup is working!");
    }
}
Predict first. Then reveal the expected output / வெளியீடு
My Java setup is working!

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

நீங்களே முயற்சி செய்யுங்கள்

Practice challenge

Run the example in the browser, then reproduce it locally using the two commands above.

Reveal the answer and reasoning / விடை

Both runs should print the same message. If javac is not found locally, check that you installed a JDK and configured the terminal PATH.

தவிர்க்க வேண்டிய தவறு: An online compiler working successfully does not prove your local JDK is configured. Check the local compiler separately.

பாடத்தின் சுருக்கம்

  • 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.