Answer Posted / jyotisubhra ghosh
You can not instantiate an interface,however, u can create
its reference variabe.
You can just assign an object of a class (implementing the
interface) to the reference variable of the interface.
| Is This Answer Correct ? | 50 Yes | 1 No |
Post New Answer View All Answers
Can we sort hashmap in java?
What is * argv?
Give a brief description of java socket programming?
What are the differences between throw and throws?
What are the actions that can occur when a thread enters blocked state?
What's the difference between comparison done by equals method and == operator?
What is operator overloading. Is it is supported in java?
What is an enumeration?
What is supplier in java?
What is sortedmap interface?
Difference between Preemptive scheduling vs. Time slicing?
What is string builder in java?
When to use runnable interface vs thread class in java?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
Can you start a thread twice in Java?