Pergunta de entrevista da empresa Infinite Computer Solutions

Questions they asked me: 1. Find top 3 maximum salary employees from each department using Java Streams. 2. Now I have created one method one object level locking, okay? Fine. Now A and B is calling method one at the same time. Okay? What will be happen? How it will be work?: Thread1 a,b,c Thread2 d,e,f object.level.sync a.method(); b.method(); 3. Thread1 and thread2 TES, right? Okay, A and B, okay, A and B object of thread1 is calling to method1, okay, at same time. Then what will happen? 4. Synchronised HashMap vs Synchronised Hastable. 5. Default capacity of arrayList? 6. Comparable vs Comparator? 7. How to use Employee object as key in HashMap and handle duplicate objects properly? 8. Question is about Spring Boot Dependency Injection.