Difference between interface and abstract class with ex.

Answer Posted / aditya

Abstract Class :
1. Can have implemented(non-abstract) method
2. Can have any visibility public,protected,private


Interface :
1. All methods are non-implemented(abstract)
2. Only visibility is public or none
3. All variables should be static and final

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we store variables in local blocks?

784


What is heterogeneous in java?

492


What is java developer skills?

516


Write a program to reverse a number in java?

562


What is a pointer and does java support pointers?

559






What is static block?

590


Explain the init method?

544


Can It is possible to synchronize the constructor of a Java Class?

592


What is the meaning of I ++ in java?

605


Is Constructor possible in abstract class in java ?

588


What is the use of object and class classes?

569


What are extraneous variables examples?

527


Why do we need hashmap in java?

554


What are different types of constants?

518


How infinite loop is declared?

537