0

What is an object

30th Jun 2017, 1:26 PM
Nishant Dhiman
Nishant Dhiman - avatar
2 odpowiedzi
+ 4
It is a single instance of a class. It has some defined properties and methods you can operate on. Consider: "aSampleText". It is an object of a String class. You can print() it, concatenate it and assign it to a variable. Object Oriented Programming (OOP) as a concept assumes that everything (or almost everything) is an object. Which is very true in some languages :)
30th Jun 2017, 1:35 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
a object is a representative of a class that can access all class elements with the defined rules for objects . consider a example in a event you are represent ing you collage /school/company ....etc. here your company is a class and you are the object of your company.
30th Jun 2017, 1:55 PM
Rohan Vijayvergiya
Rohan Vijayvergiya - avatar