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
Can we assign null to double in java?
Is string pool garbage collected?
Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?
What is the use of conditional statement?
List some important characteristics on jre
How many types of java are there?
Does every java program need a main?
What is Java Reflection API? Why it’s so important to have?
Why java applets are more useful for intranets as compared to internet?
What is finalize method?
What is the difference between hashset and treeset in java?
Which is bigger double or float?
What is the maximum size of hashmap in java?
In java, how we can disallow serialization of variables?
What is the point of polymorphism java?