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
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
Is it possible to override private or static method in java?
What is remote method invocation (rmi)?
How big is a boolean?
List the features of java programming language.
What does @override mean?
How is java hashmap implemented?
What is the use of java?
What value is a variable of the string type automatically initialized?
How many bits is a word?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
How many unicode characters are there?
Difference between error and exception
Why java is not 100% object-oriented?
Can we declare a class as static?