can you create interface instance ?
Answer Posted / bibhuti
i am bit confused with this one.
If it is referring to an anonymous class then if i am changing like below then why it is not working?
public static void main(String[] args) {
Object t = new TestOne() {
public void wish() {
System.out.println("output: hello how r u");
}
};
t.wish();
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What do you mean by constant time complexity?
What are class types in java?
Why is stringbuffer faster than string?
How many ways can you break a singleton class in java?
What does int argc char * argv [] mean?
What are streams?
What is java Applet?
Explain Basics of OOP Language in java
What is the main advantage of passing argument by reference?
Explain what pure virtual function is?
Will set allow duplicates in java?
What are predicates in java 8?
What is string variable?
What are the advantages of encapsulation in java?
Which one will take more memory: an int or integer?