Introduction to Java and Syntax
Introduction to Java and Syntax
Java is a high-level, object-oriented programming language that is widely used for developing
enterprise applications, mobile applications, and web applications. Created in 1995 by James
Gosling and his team at Sun Microsystems, Java emphasizes portability (write once, run anywhere)
through its use of the Java Virtual Machine (JVM).
Key Topics:
- Basic structure of a Java program (classes, methods, main method)
- Data types: int, double, char, boolean, etc.
- Control structures: if-else, switch, for loop, while loop
- Simple input/output using System.out.println()
Example:
--------------------------------
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
--------------------------------