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
Variable of the boolean type is automatically initialized as?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
If try block is successfully executed, Then Is Finally block executed?
What is tochararray in java?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
What is difference between array and arraylist in java?
What is a vector in java?
What is vector?
What is * argv?
How many bytes is a string java?
What is the access scope of a protected method?
What is a class in java?
What are the methods used to implement for the key object in the hash map?
What is thread safe java?
What is serialization in java?