can you create interface instance ?
Answer Posted / deepesh
Hi Uday.
Actually, in your problem, a reference of anonymous
inherently assigned to interface. In program, you no where
wrong, but instance of interface were not created, it
simply assigning the reference of anonymous class to
interface.. That is possible.
any way.. We can't create instance of interface.. In that
example only reference assignment to interface by anonymous
class.
Hope everybody can understand.
| Is This Answer Correct ? | 30 Yes | 1 No |
Post New Answer View All Answers
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Who is the owner of java?
What is the default value of an object reference declared as an instance variable?
What is unicode with example?
what is meant by encapsulation?
Does substring create a new object?
What is anti pattern in cyber security?
Describe how to implement singleton design pattern in struts.
What is autoboxing in java?
What is the difference between class & object?
What is meant by vector class, dictionary class, hash table class, and property class?
Can we return null in java?
What is meant by oops concept in java?
What is the synonym of procedure?
How do you start a thread?