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
What are the application of stack?
Does java support multiple inheritances?
What is a bubble sort in java?
When will we prefer to use set and list in java and why?
Why singleton pattern is better than creating singleton class with static instance?
List the different types of classloaders in java.
Is null an object in java?
What carriage return means?
What is difference between stringbuffer and string?
What is static keyword?
What exactly is java?
What is jar?
Is java platform independent?
How to sort elements in a parallel array in java?
Is java free for commercial?