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 are different type of exceptions in java?
How do I run java on windows?
What is strings in java?
What will happen if a thrown exception is not handled?
Explain throw keyword in java?
Why does java not support operator overloading?
What is a flag value?
Can we declare the main method of our class as private?
Can a method inside a interface be declared as final?
What is the difference between yielding and sleeping in java programming?
What is string manipulation?
How do you identify if jvm is 32-bit or 64-bit from java program?
Which package is imported by default?
What data type is a string?
How to read and write image from a file ?