Java
Java
1. Introduction to Java
2. Basic Syntax
System.out.println(“Hello, World!”);
}
3. Data Types
Primitive Types
Non-Primitive
5. Operators
Arithmetic: + - * / %
Assignment: = += -= *=
6. Control Statements
Conditional
If (x > 0) {
System.out.println(“Positive”);
} else {
System.out.println(“Non-positive”);
Loops
System.out.println(i);
}
7. Arrays and Strings
8. Methods (Functions)
Return a + b;
9. Object-Oriented Programming
String color;
Void drive() {
Encapsulation
Inheritance
Class Animal {
Void speak() {
System.out.println(“Speaking”);
Void bark() {
System.out.println(“Barking”);
Polymorphism
Method Overloading (compile-time)
Abstraction
Abstract Classes
Interfaces
Interface Drawable {
Void draw();
10. Constructors
Class Person {
Person() {
System.out.println(“Constructor called”);
Can be overloaded.
Try {
Int x = 10 / 0;
} catch (ArithmeticException e) {
System.out.println(“Error: “ + e);
} finally {
Import java.io.*;
Writer.close();
14. Multithreading
System.out.println(“Thread running…”);
Lambda Expressions
(x, y) -> x + y;
Streams API
Functional Interfaces
Frame.setSize(300, 200);
Frame.setVisible(true);
20. Keywords
Class, interface, extends, implements, final, this, super, static, void, return,
try, catch, throws
Would you like this in PDF format, or need sample programs and exercises for
practice?