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 do you know about the garbage collector?
What is update method called?
In a container there are 5 components. I want to display all the component names, how will you do that?
What are the library functions in java?
What is native method in java?
What is scope & storage allocation of global and extern variables? Explain with an example
What is an argument java?
What is the difference between inner class and nested class?
Why there are some null interface in java? What does it mean?
What are the elements of java?
What do you mean by constant time complexity?
What is the difference between Array and Hash Table?
What is the purpose of a transient variable?
What is the use of hashmap in java?
What is singleton pattern?