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
Why is an interface be able to extend more than one interface but a class can’t extend more than one class?
What is the constructor?
Why main method is static in java?
What is string manipulation?
What is a dot notation?
How do you clear a list in java?
What do you mean by hashing?
What is a get method?
What is binary tree in java?
What is square root in java?
How to reverse a string in java?
What are different types of constants?
what is thread? : Java thread
List out five keywords related to exception handling ?
How to do encapsulation in java?