can we create instance for interface in java?

Answer Posted / venkateswararao

No,we cant create an instance if an interface in java , but
we can create a reference of an interface and we can
assign the object of a class to that interface reference.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is prime number in java?

754


What is formatted output in java?

720


What is the benefit of abstract class?

710


What is the public method modifier?

744


What comes to mind when someone mentions a shallow copy in java?

883


Can we overload run() method in java?

850


What is thread life cycle?

717


Describe different states of a thread.

772


Does java support multiple inheritances?

784


Difference between Preemptive scheduling vs. Time slicing?

788


Can a final variable be null?

751


What is lambda programming?

706


What is anagram word?

748


What is the ==?

672


Which list does not allow duplicates in java?

717