Introduction to Java
• Your Name / Date
What is Java?
• High-level, object-oriented programming
language
• Developed by Sun Microsystems in 1995
• Write Once, Run Anywhere (WORA)
Features of Java
• Platform independent (via JVM)
• Object-oriented (supports OOP principles)
• Robust and secure
• Multithreaded and high performance
Java Editions
• Java SE – Standard Edition
• Java EE – Enterprise Edition
• Java ME – Micro Edition for mobile devices
JVM, JRE, JDK
• JVM – executes bytecode
• JRE – JVM + libraries
• JDK – tools for compiling & running Java
Java Syntax Basics
• public class HelloWorld {
• public static void main(String[] args) {
• [Link]("Hello, World!");
• }
• }
Data Types and Variables
• Primitive: int, float, double, char, boolean
• Non-primitive: String, Arrays, Objects
• Example: int age = 25;
Operators and Expressions
• Arithmetic: +, -, *, /, %
• Relational: ==, !=, >, <
• Logical: &&, ||, !
Control Statements
• Conditional: if, else, switch
• Loops: for, while, do-while
• Example: for(int i=0;i<5;i++)
{[Link](i);}
Summary
• Java is versatile, secure, and platform-
independent
• Foundation for advanced Java topics like OOP
and collections