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


Please Help Members By Posting Answers For Below Questions

What is subsequence of a string?

696


Explain the importance of throws keyword in java?

655


Can memory leak in java?

676


define polymorphism in java

723


what are different ways in which a thread can enter the waiting state? : Java thread

585






Is binary a low level language?

610


What is the difference between hashmap and hashtable in java?

650


Define locale.

678


What is null statement?

633


Explain the difference between the public, private, final, protected, and default modifiers?

640


What is private public protected in java?

686


What is the properties class?

661


How to compare two strings in java program?

742


Can we make a constructor final?

649


What is the difference between compiler and jvm?

645