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
Does list allow duplicates in java?
Why do we use predicate in java?
Why is a singleton bad?
What is thread start?
How to check if linked list contains loop in java?
How do you declare a variable?
What steps are taken when the OS shifts from one-thread execution to another?
Give an example of call be reference significance.
How many bits is size_t?
What are the differences between forwarding () method and sendredirect() methods?
What is a cup of java?
What is string intern in java?
Highest level event class of the event-delegation model?
What is the use of put method?
How many bytes is a string?