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 the default access specifier for variables and methods of a class?
What is meant by flickering?
What is Classloader in Java?
When can an object reference be cast to an interface reference in java programming?
What is jit compiler ?
What is getclass () getname () in java?
What is mvc in java?
Who developed java?
what is difference between equals and ==?
What is object cloning in Java?
Is it possible to override the main method?
What are internal and external variables?
What are the advantages and disadvantages of object cloning?
What is the difference between Grid and Gridbaglayout?
Is heap stored in ram?