Advertisements
Advertisements
Question
A method is invoked through an:
Options
Object
System
Parameter
None
MCQ
Solution
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
Is there an error in this question or solution?