0% found this document useful (0 votes)
9 views

Unit-I Introduction To Class, Object and Methods

The document discusses object oriented programming concepts like class, object, syntax of a class, object memory representation, and creating an object for a class. It provides examples and details for each concept.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Unit-I Introduction To Class, Object and Methods

The document discusses object oriented programming concepts like class, object, syntax of a class, object memory representation, and creating an object for a class. It provides examples and details for each concept.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

LAKIREDDY BALI REDDY COLLEGE OF

ENGINEERING

Object Oriented Programming


By

S.V.V.D.Jagadeesh
Sr. Assistant Professor
Dept of Artificial Intelligence & Data Science
LBRCE

Previous Discussion
History of Java
JDK, JRE and JVM
Java Compilation
Features (Buzzwords) of Java

OOP S.V.V.D.Jagadeesh Friday, July 26, 2024


LBRCE

Session Outcomes

At the end of this session, Student will be able to:


 CO1: Make use of Classes, Objects and Methods to solve problems. (Apply- L3)

OOP S.V.V.D.Jagadeesh Friday, July 26, 2024


LBRCE

Class
A class is a group of objects that has common properties. It is a
template or blueprint from which objects are created..
A class in java can contain:
data member
method
constructor
block
class and interface

OOP S.V.V.D.Jagadeesh Friday, July 26, 2024


LBRCE

Object
An entity that have state and behavior is called as object.
Ex: Chair, TV, table pent
Characteristic of Object:
 State : represents the data of an object. (value)
 Behavior : represents the behavior of an object (Functionality)
 Identity: Object identity is typically implemented via a unique ID. The value
of the ID is not visible to the external user, but is used internally by the JVM
to identify each object uniquely.
Example: pen is an object name is Reynolds color is white etc., known as state.
Used for writing is its behavior.
Object is instance of the class. Class is a template or blueprint from which objects
are created.
OOP S.V.V.D.Jagadeesh Friday, July 26, 2024
LBRCE

Syntax of a class
class classname type methodname2(parameter-list)
{ {
type instance-variable1; // body of method
}
type instance-variable2; // ...
//.... type methodnameN(parameter-
type instance-variableN; list)
type methodname1(parameter-list) {
// body of method
{ }
// body of method }
}
OOP S.V.V.D.Jagadeesh Friday, July 26, 2024
LBRCE

Object Memory Representation

OOP S.V.V.D.Jagadeesh Friday, July 26, 2024


LBRCE

Creating an object for a class


Syntax:
ClassName objectname=new ClassName();

OOP S.V.V.D.Jagadeesh Friday, July 26, 2024


LBRCE

Summary
Class
Object
Syntax of a class
Object Memory Representation
Creating an object for a class

OOP S.V.V.D.Jagadeesh Friday, July 26, 2024

You might also like