Can java object be locked down for exclusive use by a given thread?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

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.

3 Answers  


What is matcher in java?

0 Answers  


When does the compiler supply a default constructor for a class?

9 Answers   TCS,


printstream class method println() is calling using System class and its static object out .how it is explain any one in detail with example ?

1 Answers   TCS,


What is difference between string and stringbuffer?

0 Answers  


what is struts-config-xml?and its use?

3 Answers  


What is persistence ?

2 Answers  


Where is singleton pattern used?

0 Answers  


What is set string?

0 Answers  


How to prevent to create multiple objects of a java class?

3 Answers   ASD Lab, TCS,


Difference between current previous versions of Java?

0 Answers   Atos Origin,


Can we use a default constructor of a class even if an explicit constructor is defined?

0 Answers  


Categories