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 is string [] java?
How long will it take to learn java?
What is a native method in java programming?
Explain about wait() method?
What do you mean by constant time complexity?
List out five keywords related to exception handling ?
When to use runnable interface vs thread class in java?
Is sizeof a preprocessor?
What are strings in physics?
What is anti pattern in java?
What is static and final keyword in java?
What is the difference between path and classpath variables?
What's the purpose of using break in each case of switch statement?
What is null mean in java?
What are classloaders?