what is the difference between abstract class and
Interface?where we can use it in realtime projects?
Answer Posted / nitesh
1)We define an Interface in the Java application with a
set of abstract methods without any implementation. Which
means all the methods of an interface are by default
abstract methods and public methods.
2)Once an Interface is defined in the application then any
class can implement that interface, in such case the class
must be implemented with all the mehtods of the respective
Interface otherwise the class will become as abstract class.
3)A class can implement any no. of interfaces, in such case
the class must be implimented with all the methods of those
interfaces otherwise the class will become as abstract class
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Which is bigger float or double java?
Which is faster call by value or call by reference?
What is bytecode in java ?
Explain the difference between protected and default access.
What happens if constructor is private?
What is unsigned char?
What is the final keyword?
Explain an intermediate language?
Explain with example the concept of constant variable in java.
Can we assign integer value to char in java?
Why we cannot override static method?
Is string is a data type in java?
What are static initalizers in java ?
What is the difference between synchronized and synchronized block?
What’s meant by anonymous class?