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
make a method which any number and any type of argument and print sum of that arguments.....
Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
Why put method is used?
What is polymorphism in java? What are the kinds of polymorphism?
Which is bigger float or double?
Which is better 64 bit or 32 bit?
Why array is used in java?
What are the differences between path and classpath variables?
What interface is extended by awt event listeners?
What is internal variable?
How do you test a method for an exception using junit?
How do you define a set in java?
Is null a keyword in java?
Can we serialize static variables in java?
What methodology can be utilized to link to a database?