Advertisements
Advertisements
Question
Method which is a part of a class rather than an instance of the class is termed as ______.
Options
Static method
Non static method
Wrapper class
String method
Solution
Method which is a part of a class rather than an instance of the class is termed as Static method.
APPEARS IN
RELATED QUESTIONS
What are the two ways of invoking functions?
Differentiate between formal parameter and actual parameter.
How are private members of a class different from public members?
Write a menu-driven program to display the pattern as per the user’s choice.
For an incorrect option, an appropriate error message should be displayed.
Invoking a method by passing the objects of a class is termed as ______.
Assertion (A): Static method can access static and instance variables.
Reason (R): Static variables can be accessed only by static method.