filmov
tv
P17 - Class and Object in Java | Core Java |

Показать описание
In this video, I have explained about "Class and Object in Java".
Video Timeline:
00:00 Introduction
00:08 What is a class?
04:27 What is an Object?
10:08 summary
⭐⭐ What Is a Class?
A class is a blueprint or prototype from which objects are created.
⭐⭐ What Is an Object?
An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life.
Syntax:
ClassName variableName = new Constructor;
Examples:
Point originOne = new Point(23, 94);
Rectangle rectOne = new Rectangle(originOne, 100, 200);
Rectangle rectTwo = new Rectangle(50, 100);
The first line creates an object of the Point class, and the second and third lines each create an object of the Rectangle class.
Each of these statements has three parts (discussed in detail below):
Declaration: The code set in bold are all variable declarations that associate a variable name with an object type.
Instantiation: The new keyword is a Java operator that creates the object.
Initialization: The new operator is followed by a call to a constructor, which initializes the new object.
==============================================
👑 Join my youtube channel to get access to perks:👇
==============================================
==============================================
Connect us @
==============================================
==============================================
🙏 Please Subscribe🔔 to start learning for FREE now, Also help your friends in learning the best by suggesting this channel.
#hyrtutorials #java #corejava
Java programming by Yadagiri Reddy
Video Timeline:
00:00 Introduction
00:08 What is a class?
04:27 What is an Object?
10:08 summary
⭐⭐ What Is a Class?
A class is a blueprint or prototype from which objects are created.
⭐⭐ What Is an Object?
An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life.
Syntax:
ClassName variableName = new Constructor;
Examples:
Point originOne = new Point(23, 94);
Rectangle rectOne = new Rectangle(originOne, 100, 200);
Rectangle rectTwo = new Rectangle(50, 100);
The first line creates an object of the Point class, and the second and third lines each create an object of the Rectangle class.
Each of these statements has three parts (discussed in detail below):
Declaration: The code set in bold are all variable declarations that associate a variable name with an object type.
Instantiation: The new keyword is a Java operator that creates the object.
Initialization: The new operator is followed by a call to a constructor, which initializes the new object.
==============================================
👑 Join my youtube channel to get access to perks:👇
==============================================
==============================================
Connect us @
==============================================
==============================================
🙏 Please Subscribe🔔 to start learning for FREE now, Also help your friends in learning the best by suggesting this channel.
#hyrtutorials #java #corejava
Java programming by Yadagiri Reddy
Комментарии