How do you differentiate abstract class from interface?



How do you differentiate abstract class from interface?..

Answer / Vivekanand Sharma

"An abstract class in Java can have instance variables, constructors, and non-abstract methods in addition to abstract methods. An interface, on the other hand, only contains constants (variables with final keyword) and abstract methods without implementation. Interfaces are used for multiple inheritance as a class can implement multiple interfaces but can extend only one abstract class."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

how we can make a write-only class in java?

1 Answers  


What is array initialization in java?

1 Answers  


What do you mean by collectors in java 8?

1 Answers  


What is command line argument in java?

1 Answers  


What are library required to connect to excel sheet.

2 Answers   Cap Gemini,


What is persistence ?

2 Answers  


Can a vector contain heterogenous objects?

1 Answers  


What is thread safe in java?

1 Answers  


How many bits does a boolean take?

1 Answers  


what is singlton class?where it is use in real time senario.

1 Answers   Wipro,


What is ++ a in java?

1 Answers  


What are the advantages of exception handling in java?

1 Answers  


Categories