1(ix)
Which of the following is true for the given object creation statement?
Game cricket = new Game();
- (a)Game is an object of cricket class
- (b)New keyword creates object Game
- (c)Game is a class and cricket is an object
- (d)Game and cricket are objects
Show SolutionHide Solution↓
Game is a class and cricket is an object
Reason — In the statement Game cricket = new Game();, Game is the name of the class, and cricket is the object (or instance) created from that class. The new keyword is used to create a new object of the class. Therefore, Game is the class, and cricket is the object.