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
What is an arraylist in java?
How to invoke external process in java.
What are the 6 boolean operators?
Can singleton class be serialized?
What is numeric function?
What is thread synchronization in java?
What are basic keywords?
Is java hashset ordered?
What is array size in java?
What are java packages? What's the significance of packages?
Explain what access modifiers can be used for variables?
What is the difference between JDBC 1.0 and JDBC 2.0?
What is the use of default method in interface in java? Explain
What type of language is java?
What is an immutable object?