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 is generic class?
Is arraylist dynamic in java?
Which is better stringbuilder or stringbuffer?
What is module in project?
Can You Have Virtual Functions In Java?
List any five features of java?
Does printwriter create a file?
How do you bind variables?
Can we declare a class as abstract without having any abstract method?
How to implement a multithreaded applet?
What is identifier give example?
What is the difference between state-based unit testing and interaction-based unit testing?
What are mutable classes?
What is object cloning in Java?
what is heap memory?