Round 1(F2F)
This was for Java developer.
- Which java version have you been working with, new features introduced in the same?
- How was streams included in java? (using static functions in interface)
- Association in java?
- Types of polymorphism?
- Explain runtime polymorphism with code? What happens when we change the return type in child class? How about static classes?
- How is string stored?
- What will the output question wherein 4 different string where created using string literal and new keyword, and they were compared with == operator?
- Explain with code how can you make a class immutable? Now if you want your class to be used as key in hashmap, is it ok or you need to do something? (implement hashcode and equals method for this class)
- There is a User class with variables as id, name, city. We have been given a List of User objects, using stream populate a map such that each entry of map is <user_object, "user.id_user.name_user.city">.
- Write a multithreaded code, where we have a fixed buffer(let's say a list of size 10) wherein a producer thread is adding value, and consumer thread is removing value.
Comments (3)


