0% found this document useful (0 votes)
7 views3 pages

Java 3 Page Introduction

Java is a high-level, object-oriented programming language known for its platform independence due to the Java Virtual Machine (JVM). It is popular for its 'Write Once, Run Anywhere' capability, strong typing, security, and robust community support. Key concepts include variables, data types, conditional statements, loops, and object-oriented programming principles such as encapsulation, inheritance, polymorphism, and abstraction.

Uploaded by

kumaravel.kv198
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Java 3 Page Introduction

Java is a high-level, object-oriented programming language known for its platform independence due to the Java Virtual Machine (JVM). It is popular for its 'Write Once, Run Anywhere' capability, strong typing, security, and robust community support. Key concepts include variables, data types, conditional statements, loops, and object-oriented programming principles such as encapsulation, inheritance, polymorphism, and abstraction.

Uploaded by

kumaravel.kv198
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to Java

Java is a high-level, object-oriented programming language developed by Sun Microsystems.


It is platform-independent because of the Java Virtual Machine (JVM).

Why Java is popular:


- Write Once, Run Anywhere
- Strongly typed language
- Secure and robust
- Large ecosystem and community

Basic Java Example:

public class Main {


public static void main(String[] args) {
[Link]("Hello, World!");
}
}

Java programs are compiled into bytecode and run on the JVM.
Java Basics

Variables in Java:
int x = 10;
String name = "John";

Data Types:
- int
- double
- char
- boolean
- String

Conditional Statements:
if (x > 5) {
[Link]("Greater than 5");
} else {
[Link]("Less or equal to 5");
}

Loops:
for (int i = 0; i < 5; i++) {
[Link](i);
}
OOP Concepts in Java

Object-Oriented Programming Concepts:


- Encapsulation
- Inheritance
- Polymorphism
- Abstraction

Example Class:

class Person {
String name;

Person(String name) {
[Link] = name;
}

void greet() {
[Link]("Hello " + name);
}
}

Packages:
Java uses packages to organize classes.
Example:
import [Link];

Java is widely used in web applications, Android development, and enterprise software.

You might also like