What is the maximum size of a string in java?
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 the difference between static class and singleton class? can we create static class?
2 Answers L&T, Octazen, Vamsi Labs,
What is Recursion Function?
What is super in java?
What are byte codes?
what is difference between Action messages and Action errors?
What is Connection pooling? Explain Pros and Cons?
What is a method vs function?
Explain about the dynamic behavior of core java?
What do you know about the garbage collector?
What do you mean by platform independence? What is an interface?
When is the finalize() called? What is the purpose of finalization?