Answer Posted / nagendra prasadu gandla
Yes you can instanciate but you have to implement the
methods of interface at the time of instanciation itself.
EX:
interface X
{
void abc();
}
class a
{
X z=new X(){void abc(){return;}};
}
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
What is method with example?
what is bmg file and how to create that files?what will it contailn?
How to use string tokenizer class.
Explain when noclassdeffounderror will be raised ?
How many bits is a boolean?
Can variables be used in java without initialization?
What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?
How many bytes is a unicode character?
What is an array length?
How to create packages in java?
Does java support function overloading, pointers, structures, unions or linked lists?
What are serialization and deserialization?
Explain about anonymous inner classes in java?
What is a methodologist?
How do you sort arraylist in descending order?