Telephonic Java Interview Series 26
This is Telephonic Java Interview Series 26 questions for Sr. Java Developer position in financial company in NY. Below are questions:
1. What is multithreading in Java ?
2. How do you achieve multithreading in Java ?
3. Can you define sleep method inside synchronization block ?
4. Can you synchronized static method ?
5. If you have class where one static method has been synchronized and another method also synchronized with static. When object try to access it how many lock will be created ?
6. Can non static method access static method ?
7. What is difference between Abstract class and interface ?
8. If you define one class with variable in int i = 10 and same variable name with int i =10 and another class extend and implement interface how value will be accessible ?
9. What is immutable and what is the use of it ?
10. How you create class immutable ?
11. If suppose you define one immutable class and this class is keeping reference of another class which is not immutable. Can we change another class variable inside immutable or out side of this class ?
12. What is DI in spring ?
13. What is dead lock why this happens ?
14. Let’s take one scenario where whenever you start application it goes to dead lock ? What would be your approach to find solution ?
15. Another scenario where you start application once user start accessing application it goes to dead lock. What would be your approach to find solution ?
16. What scenario you use Abstract class or interface ?
17. How yo achieve multiple inheritance in Java ?