Advertisements
Advertisements
प्रश्न
A method is invoked through an:
विकल्प
Object
System
Parameter
None
MCQ
उत्तर
Object
Explanation:
- In Java, non-static methods are called using an object from the class to which they belong.
- An object is an instance of a class that provides access to the class's methods and variables.
- Static methods are called with the class name, whereas most instance methods need object instantiation.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?