can you create interface instance ?
Answer Posted / devir
No,Uday is wrong.
He has created an anonymous inner class Test with the same
name as interface Test.It doesn't depend on the interface Test.
If an instance for interface Test has to be created ,he
sholud have implement interface Test such as
class Main implements Test{
}
| Is This Answer Correct ? | 17 Yes | 2 No |
Post New Answer View All Answers
What is a cup of java?
Explain about serializable interface in java?
Why is the main method static?
How transient variable is different from volatile variable?
Can an abstract class be a final class?
What do you mean by garbage collection used in java?
What happens when a thread cannot acquire a lock on an object in java programming?
What are recursive functions?
What is immutable data?
What is the base class of all exception classes?
Can you use this() and super() both in a constructor?
what is instanceof operator used in java?
How can you write a loop indefinitely in java programming?
Difference between serialization and deserialization in java?
When would you use a static class?