


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Java is one of the most popular programming languages in the world. It was developed by Sun Microsystems and is now maintained by Oracle. Java is widely used for web applications, desktop applications, mobile applications, enterprise software, and cloud-based systems. Java follows the principle of โWrite Once, Run Anywhereโ because Java programs can run on any platform that contains the Java Virtual Machine (JVM).
JDK (Java Development Kit) is used for developing Java programs. It contains the compiler, debugger, and JRE. JRE (Java Runtime Environment) is used to run Java applications. It contains JVM and supporting files. JVM (Java Virtual Machine) converts Java bytecode into machine code and executes it.
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } }
class โ Defines a class. main() โ Entry point of the Java program. System.out.println() โ Used to print output.
Data Type Description int Stores integers float Stores decimal numbers double Stores large decimal numbers char Stores single character boolean Stores true or false values String Stores text
Java operators are symbols used to perform operations on variables and values. Arithmetic Operators: +, -, *, /, % Relational Operators: ==, !=, >, Logical Operators: &&, ||,!
Control statements decide the flow of execution in a program. Conditional Statements:
Looping Statements:
An array stores multiple values of the same data type in a single variable. Example:
int[] numbers = {1,2,3,4,5}; System.out.println(numbers[0]);
A String is used to store text. Example:
String name = "Hima"; System.out.println(name);
Java is widely used in: โข Android app development
Java is a powerful and versatile programming language used in many industries. Understanding Java basics such as data types, operators, loops, OOP concepts, and exception handling is important for building a strong programming foundation.