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 strings in java?
What is primitive data type in java?
What are the advantages of inner classes?
if u open login & logout ,how can udisplay the timelogin & logout members ?
How is java hashmap implemented?
Can a static member function access member variable of an object?
What are the 8 data types in java?
What do you mean by synchronized non access modifier?
What is difference between arraylist and list in java?
How list contains works in java?
Is sizeof a keyword in java programming?
In a class implementing an interface, can we change the value of any variable defined in the interface?
Can a class with private constructor be extended?
What are the differences between string, stringbuffer and stringbuilder?
What is the difference between inner class and nested class?