Java: ஓர் அறிமுகம் (Introduction)
A small program. A new way to solve problems.
முக்கிய விளக்கங்கள் தமிழில் உள்ளன. Runnable example மற்றும் கூடுதல் practice notes ஆங்கிலத்தில் உள்ளன.
இந்தப் பாடத்தில்…
- Explain the key idea behind Introduction.
- Read and run a complete example, then predict what changes.
- Recognize the topic-specific mistake discussed below.
அடிப்படையைப் புரிந்துகொள்ளுங்கள்
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.
விரிவான விளக்கங்கள்
Java என்றால் என்ன?
Java என்பது உலகளவில் மிகவும் பிரபலமான, சக்திவாய்ந்த மற்றும் பாதுகாப்பான (secure) programming language ஆகும். 1995-ல் உருவாக்கப்பட்ட இது, தற்போது Oracle நிறுவனத்தால் நிர்வகிக்கப்படுகிறது.
உலகெங்கிலும் 3 பில்லியனுக்கும் அதிகமான சாதனங்களில் (devices) Java இயங்குகிறது. இதன் முக்கிய பயன்பாடுகள்:
- Enterprise Web Applications (நிறுவன அளவிலான இணையதளங்கள்)
- Mobile Apps (குறிப்பாக Android செயலிகள்)
- Cloud-based Applications மற்றும் Microservices
- Big Data Technologies (உதா: Apache Hadoop)
- Database Connections மற்றும் Web Servers
How Java Works — Write Once, Run Anywhere (WORA)
Java-வின் மாபெரும் வெற்றிக்குக் காரணம் அதன் WORA கோட்பாடு ஆகும். நீங்கள் எழுதும் Java code முதலில் Bytecode-ஆக (.class file) மாற்றப்படும். பின்னர், அந்த Bytecode-ஐ எந்த Operating System-ல் வேண்டுமானாலும் JVM இயக்கும்.
| Tool | விரிவாக்கம் மற்றும் செயல்பாடு | பயன்பாடு |
|---|---|---|
| JDK | Java Development Kit: Compiler, Debugger மற்றும் JRE அடங்கிய முழுமையான Toolkit. | புதிய Java code எழுத மற்றும் compile செய்ய. |
| JRE | Java Runtime Environment: JVM மற்றும் அடிப்படை class libraries-ஐ உள்ளடக்கியது. | உருவாக்கப்பட்ட Java program-ஐ இயக்க (Run). |
| JVM | Java Virtual Machine: Bytecode-ஐ அந்தந்த OS-க்கு ஏற்றவாறு இயக்குகிறது. | Cross-platform execution (WORA-வை சாத்தியமாக்குவது). |
Development சூழலில் (உங்கள் லேப்டாப்பில்) JDK தேவைப்படும். ஆனால், ஒரு Application-ஐ Server-ல் deploy செய்யும்போது, அதை இயக்குவதற்கு JRE மட்டுமே போதுமானது. நினைவில் கொள்க: JVM ஆனது JRE-க்குள் இயங்குகிறது!
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
System.out.println("Welcome to Coding Tamilan!");
}
}
// Output:
// Hello, World!
// Welcome to Coding Tamilan!Interview Question: Java-வின் 'Write Once, Run Anywhere' (WORA) திறனுக்குக் காரணமான முக்கிய தொழில்நுட்பம் எது?
- அது ஒரு Object-oriented language என்பதால்
- JVM (Java Virtual Machine) bytecode-ஐ execute செய்வதால்
- Oracle நிறுவனம் அதை update செய்வதால்
- அது HTML-உடன் இணைந்து செயல்படுவதால்
Reveal answer / விடை
JVM (Java Virtual Machine) bytecode-ஐ execute செய்வதால்
சரியான விடை! Java compiler உருவாக்கும் Bytecode ஆனது Platform-independent ஆகும். இந்த Bytecode-ஐ அந்தந்த Operating System-ல் உள்ள JVM வாசித்து இயக்குகிறது.
முழுமையான உதாரணம்
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.
நீங்களே முயற்சி செய்யுங்கள்
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.
தவிர்க்க வேண்டிய தவறு: Do not confuse Java with JavaScript. They are separate languages with different runtimes and ecosystems.
பாடத்தின் சுருக்கம்
- 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.