What is classname class in java?
No Answer is Posted For this Question
Be the First to Post Answer
What does three dots mean in java?
Can you make a constructor final?
how to handle exceptions in core applications?
What is abstract class constructor called?
Why there are some null interface in java? What does it mean?
What is a singleton class in Java?
what is the JNDI?
Differences between jdk 1.4 and 1.5
6 Answers SoftSol, TCS, Wipro,
Given: 10. interface A { void x(); } 11. class B implements A { public void x() { } public voidy() { } } 12. class C extends B { public void x() {} } And: 20. java.util.List list = new java.util.ArrayList(); 21. list.add(new B()); 22. list.add(new C()); 23. for (A a:list) { 24. a.x(); 25. a.y();; 26. } What is the result? 1 Compilation fails because of an error in line 25. 2 The code runs with no output. 3 An exception is thrown at runtime. 4 Compilation fails because of an error in line 20.
what is difference between abstract factory and factory design patterns?
Can we have two main methods in a java class?
Which Component subclass is used for drawing and painting?