If all the methods in abstract class are declared as
abstract then what is difference between abstract class and
in interface?
Answer Posted / pravin
If you are making methods as abstract other restictions of
and difference is as it is like about modifiers[private, final, transient, volatile]
when condition is like your class extends other class [like JFrame or any such condition]then you cant use abstract class you must go to the interfaces.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is static import?
Can we change the scope of the overridden method in the subclass?
What is a singleton class in Java?
When will we prefer to use set and list in java and why?
What is a nested structure?
What are java packages? What's the significance of packages?
What is an empty string in css?
What are the Main functions of Java?
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
What is data object example?
Can a class have an interface?
What is a boolean field?
What happens if I remove static from main method?
Is arraylist a class in java?
What is the purpose of the enableevents() method?