Hr called from naukri profile. Scheduked f2f on weekend.
Round 1
1. Is string final ? What are benefits of having string as final
2. Create own user defined exception. When do we need it ?
3. Write code for composition between car and engine object
4. Treemap
5. Hashmap internal working
Round 2.
1. Create immutable class
2. Created singleton class for multithreaded env
3. Class lock and object lock. Find output with code snippet
4. Reentrant lock
5. Maven lifecycle, pom, super pom
6. Junit beforeall annotation
7 write sql query to fetch latest record of modification of any entry in db
Round 3.
Explain architecture of current project
Polymorphism. Lishkov substituion principle
Write code to make employee object as key in treemap
Semaphore
Why wait notify notify all are all in object class
Round 4
New features added in java 7 in exception handling
Explain try with resource. How it works internally.
Explain reentrant lock. Why preferred over semaphore
Difference between hashmap and concurrenthashmap. Internal working of concurrenthashmap
Write code to create callable task and get value from it
Explain internal working of future task
Triggers
Round 5
Spring basics
Lambda expression