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
Is array synchronized in java?
What is the purpose of methodology?
How we can run a jar file through command prompt in java?
How does a for loop work?
What is the difference between Java and C++?
What is dynamic binding(late binding)?
What does exclamation mean in java?
What is the method overriding?
What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?
What is composition in java?
What are the restrictions that are applied to the java static methods?
what is collatration?
What is void class in java?
What is protected in java?
Explain the scope of a variable.