-
Which of these statement is incorrect?
-
- All object of a class are allotted memory for the all the variables defined in the class
- All object of a class are allotted memory for the methods defined in the class
- If a function is defined public it can be accessed by object of other class by inheritation
- main() method must be made public
- None of these
Correct Option: B
All object of class share a single copy of methods defined in a class, Methods are allotted memory only once. All the objects of the class have access to methods of that class are allotted memory only for the variables not for the methods.