1 of 9

Object Oriented Programming

By

​

S.V.V.D.Jagadeesh

Sr. Assistant Professor

Dept of Artificial Intelligence & Data Science

​

​

LAKIREDDY BALI REDDY COLLEGE OF ENGINEERING

2 of 9

  • History of Java
  • JDK, JRE and JVM
  • Java Compilation
  • Features (Buzzwords) of Java

​

​

​

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Previous Discussion

LBRCE

OOP

3 of 9

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

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

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Session Outcomes

LBRCE

OOP

4 of 9

  • 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

​

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Class

LBRCE

OOP

5 of 9

  • 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.

​

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Object

LBRCE

OOP

6 of 9

class classname

{

type instance-variable1;

type instance-variable2;

//....

type instance-variableN;

type methodname1(parameter-list)

{

// body of method

}

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Syntax of a class

type methodname2(parameter-list)

{

// body of method

}

// ...

type methodnameN(parameter-list)

{

// body of method

}

}

LBRCE

OOP

7 of 9

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Object Memory Representation

LBRCE

OOP

8 of 9

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

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Creating an object for a class

LBRCE

OOP

9 of 9

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

S.V.V.D.Jagadeesh

Saturday, August 19, 2023

Summary

LBRCE

OOP