what is difference between Interface and abstract class

Answer Posted / naveen

Interface is a specification it tells a class has what to do.
It is purely abstract class it contains abstract methods and final static variables.
Generally begining of the project PM or TL are providing the Interfaces, developers are implementing the Interfaces.

Abstract class

Abstract class is a mediator between Interface and Class , any common code is their that code written in Abstract class and then extend the Abstract class. Abstract class containing abstract and concreate methods.
Abstract class are used in Designing level.If take java predifined class we understand easily.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between error and an exception?

567


What is the difference between static and non-static variables in java programming?

519


What is difference between printf and scanf?

516


Is empty string in java?

539


What is string intern in java?

550






What about features of local inner class?

618


What are the differences between getting and load method?

542


What are the different types of inner classes?

531


What are parsing rules?

498


What is treemap in java?

550


Why super is first line in java?

557


Is int a class in java?

525


what is the constructor and how many types of constructors are used in java?

531


What is time complexity java?

534


Can classes declared using the abstract keyword cab be instantiated?

557