0% found this document useful (0 votes)
2 views2 pages

Java Notes Full Handwritten

The document introduces Java, a high-level, object-oriented programming language developed by James Gosling. It explains key concepts such as classes, objects, and the four pillars of Object-Oriented Programming (OOP): encapsulation, abstraction, inheritance, and polymorphism. Additionally, it outlines the features of Java and provides a basic structure of a Java program.

Uploaded by

ramyargowda1113
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)
2 views2 pages

Java Notes Full Handwritten

The document introduces Java, a high-level, object-oriented programming language developed by James Gosling. It explains key concepts such as classes, objects, and the four pillars of Object-Oriented Programming (OOP): encapsulation, abstraction, inheritance, and polymorphism. Additionally, it outlines the features of Java and provides a basic structure of a Java program.

Uploaded by

ramyargowda1113
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

JAVA PROGRAMMING

UNIT 1

Introduction to Java:
Developed by James Gosling at Sun Microsystems. Java is a high-level, object-oriented programming language. It fol

Class
• A class is a blueprint or template used to create objects.
• It defines variables and methods.

Object
• An object is an instance of a class.
• It represents a real-world entity and uses the properties of a class.

Example
• For example, Car is a class and BMW, Audi are objects.

Example program to demonstrate class and object:

class Student {
int id;
String name;

void display() {
[Link](id + " " + name);
}

public static void main(String[] args) {


Student s1 = new Student();

[Link] = 1;
[Link] = "Bhavana";

[Link]();
}
}

Object-Oriented Programming (OOP) Paradigms


• OOP is based on classes and objects
• Improves code reusability
• Makes program easy to manage and secure
• Follows real-world approach

Pillars of OOPs:
1. Encapsulation
• Encapsulation means wrapping data and methods into a single unit (class).
• Data + Functions = One unit

2. Abstraction
• Abstraction means hiding internal details and showing only necessary information.

3. Inheritance
• Inheritance means one class can use properties of another class.

4. Polymorphism
• Polymorphism means one thing can have many forms.

Features of JAVA
• Object Oriented
• Platform Independent
• Interpreted
• Scalable
• Portable
• Secured and Robust
• Memory Management
• Multithreading
• Rich Standard Library
• Support for Mobile and Web Application

Structure of a Java Program:


package mypackage;
import [Link].*;
class Demo {
int x = 10;
void display() {
[Link]("Hello");
}
public static void main(String[] args) {
[Link]("Program starts here");
}
}

(remaining content continues exactly as provided in your notes...)

You might also like