when to use abstract class and when to use interface?

Answer Posted / brijendra kumar soni(xavient)

1-By using Interface we can achieve the Multiple
inheritence while by using abstract class we can not
achieve.

2-Abstract Class extended by a class only while Interface
implmented by a class and extended to one or more
interfaces.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is assembly language?

544


What does the “static” keyword mean?

576


What is the preferred size of a component in java programming?

533


What is the same as procedures?

523


What is a void in java?

567






What is the difference between static binding and dynamic binding?

549


What is lifetime variable?

518


What does jenkins do?

479


Explain what do you mean by functional overloading in java?

543


How would overload a function based on return type?

540


Differentiate between run time error and syntax error.

559


Explain java thread life cycle.

574


Is java still relevant?

488


Which one of the following suits the description of a string better: derived or primitive?

497


Why are constructors used?

546