When we will use an Interface and Abstract class?

Answer Posted / ravikiran

interface is used when we want all the methods implement
the methods differnetly in different situations.

where as an abstract classis used to define abstarct as
well as non abstract methods

Is This Answer Correct ?    15 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does @override mean?

527


What is an exception? difference between Checked and Unchecked exception in Java

548


How does system arraycopy work in java?

573


Define reflection.

569


what do you mean by stream pipelining in java 8? Explain

525






why java does not support unsigned keyword?

4237


What is a percentage sign called?

611


Can a constructor be private and how are this() and super() method used with constructor?

517


What is the difference between JDK and JVM?

623


Is java map thread safe?

485


How to create an immutable class?

562


What is return data type?

549


What is hashmap and map?

543


Does java allow overriding static methods ?

620


What are scalar data types?

515