What is default size of arraylist in java?
why would you use a synchronized block vs. Synchronized method? : Java thread
Explain thread in java?
How can you handle java exceptions?
How does arraylist work in java?
What is string [] args?
In the below example, what will be the output?
What is the difference between compiler and jvm?
whats is the use of final,in which situation final can be used in the application?
What is meant by local variable and instance variable?
How to Create A Wapper Class in core Java and Why are Use in java?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
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.