Difference between interface and abstract class with ex.
Answer Posted / aditya
Abstract Class :
1. Can have implemented(non-abstract) method
2. Can have any visibility public,protected,private
Interface :
1. All methods are non-implemented(abstract)
2. Only visibility is public or none
3. All variables should be static and final
| Is This Answer Correct ? | 17 Yes | 0 No |
Post New Answer View All Answers
Why can't we use static class instead of singleton?
Which sort is best in java?
Is vector thread safe in java?
Why is method overloading not possible by changing the return type in java?
What is get () in java?
What is the SimpleTimeZone class?
What is the difference between heap and stack memory?
Should a main method be compulsorily declared in all java classes?
How does the garbage collector works in java?
Explain about exception propagation?
How do I convert a string to an int in java?
What is a method in programming?
Why call by value prevents parameter value change?
Difference difference paint() and paintcomponent()?
Difference between a process and a program?