ICSE Class 10 Computer Applications
Question 12 of 30
Solved 2024 Question Paper ICSE Class 10 Computer Applications — Question 17
Back to all questionsfruit mango = new fruit();
Reason — In Java, creating an object follows the syntax:
ClassName objectName = new ClassName();Where:
ClassName: The name of the class.objectName: The name of the object.new: Allocates memory for the object.ClassName(): Calls the class's constructor.
Thus, fruit mango = new fruit(); correctly creates mango named object of fruit class.