can you create interface instance ?

Answer Posted / devir

No,Uday is wrong.
He has created an anonymous inner class Test with the same
name as interface Test.It doesn't depend on the interface Test.
If an instance for interface Test has to be created ,he
sholud have implement interface Test such as
class Main implements Test{
}

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the application of stack?

688


Does java support multiple inheritances?

796


What is a bubble sort in java?

738


When will we prefer to use set and list in java and why?

718


Why singleton pattern is better than creating singleton class with static instance?

797


List the different types of classloaders in java.

729


Is null an object in java?

788


What carriage return means?

722


What is difference between stringbuffer and string?

730


What is static keyword?

788


What exactly is java?

709


What is jar?

852


Is java platform independent?

772


How to sort elements in a parallel array in java?

689


Is java free for commercial?

669