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
What is meant by bytecode?
What is integer parseint?
How thread scheduler schedule the task?
What is void data type?
What is protected access modifier?
what is a working thread? : Java thread
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
What is the differences between c++ and java? Explain
What will happen if a thrown exception is not handled?
Can keyword be used as identifier?
What is wrapper class html?
Why are global variables used?
What is the difference between overriding & overloading?
What is collection class in java?
What are the data types supported by java?