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 console in java?
Why are functions called methods in java?
What is java Applet?
What do you mean by global variable?
Can we override a variable in java?
What are the string methods in java?
What is a final class ?
what is meant wrapper classes?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
Why spring singleton is not thread safe?
What does the “static” keyword mean? Can you override private or static method in java?
What does escaping a character mean?
Why is java called the platform independent programming language?
What is tree node in java?
What is the collections api?