JAVA FULL BEGINNER GUIDE
Introduction to Java
Java oru object-oriented programming language. Desktop, web, mobile, embedded ellaam use
pannalaam.
Java Structure
Java program-la class irukkum. main() method irunthaa thaan program start aagum.
Hello World Program
class Hello {
public static void main(String args[]) {
[Link]("Hello World");
}
}
Variables & Data Types
int, float, double, char, boolean, String – ivai ellaam Java data types.
Operators
+, -, *, /, %, ==, !=, >, <, &&, ||
Scanner Input
import [Link];
class Input {
public static void main(String args[]) {
Scanner sc = new Scanner([Link]);
int a = [Link]();
[Link](a);
}
}
If Else
if(age >= 18) {
[Link]("Eligible");
} else {
[Link]("Not Eligible");
}
Loops
for loop, while loop, do while loop – repeated work ku use.
For Loop Example
for(int i=1;i<=5;i++){
[Link](i);
}
Array
Array means multiple values store pannalaam same variable la.
Array Example
int a[] = {1,2,3,4,5};
[Link](a[0]);
Method / Function
Reuse panna code-ukku methods use pannalaam.
OOP Concepts
Class, Object, Inheritance, Polymorphism, Encapsulation, Abstraction
Class & Object Example
class Car {
int speed = 100;
void run() {
[Link]("Car Running");
}
}
Exception Handling
Error varum pothu handle panna try, catch use.
Try Catch Example
try {
int a = 10/0;
} catch(Exception e) {
[Link](e);
}
Conclusion
Ithu Java beginner-ku podhumana complete base.