What is the difference between static method and instance method in Java?
Answer / Pranjul Shrivastava
In Java, static methods belong to a class as a whole, while instance methods belong to individual objects of the class. Static methods are called using the class name, don't have access to instance variables (as they are shared among all instances), can't be overridden by subclasses, and can only call other static methods or static variables. Instance methods are called using object references, can access both instance and static variables, and can override methods from superclasses.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is high level language in computer?
How to use string tokenizer class.
what is Dictionary? and what purpose it is used for?
Is it possible to do method overloading and overriding at a time
what is platform independence in java?
What is unicode used for?
What is codebase?
What is difference between final and immutable?
What language is java written?
where to use join method and explain with real time senario?and programatical explenation also..
What are the different types of methodologies?
What are virtual methods?