Computer Applications
'Object is an instance of a class.' Explain this statement.
Java Classes
10 Likes
Answer
Class is a blueprint of an object. When a class is defined, it doesn't acquire any space in memory, it is only the attributes that must be common to all the objects of that class. Moreover, when an object of a class is created, it includes instance variables described within the class. This is the reason why an object is called an instance of a class.
Answered By
5 Likes
Related Questions
Explain any two types of access specifiers.
What is meant by private visibility of a method?
Differentiate between built-in data types and user defined data types.
Which of the following declarations are illegal and why?
(a) class abc{…}
(b) public class NumberOfDaysWorked{…}
(c) private int x;
(d) private class abc{…}
(e) default key getkey(…)