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
Give reasons supporting that string is immutable.
Can It is possible to synchronize the constructor of a Java Class?
how we can make a read-only class in java?
What is set string?
What is a protected void?
How does predicate work in java?
How can we create a thread in java?
Does java map allow duplicates?
What is nan inf?
How can you make a class serializable in java?
Can you call a method in a method?
What do you understand by java?
What is parameters example?
Can inner class be public in java?
Can we use string in switch case in java?