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
How java enabled high performance?
Explain about map interface in java?
Can you call a method in a method?
What is constructor and virtual function? Can we call a virtual function in a constructor?
What are the different types of inheritance in java?
How do singleton patterns work?
What is assembly language?
Describe how to implement singleton design pattern in struts.
Which graphs are functions?
How to perform quicksort in java?
What is the difference between Java1.4 and Java1.5
Write a method to check if input string is palindrome?
How do you use equal in java?
How to make a non daemon thread as daemon?
when should you use stringbuilder class in a program?