Software Developer Java Interview Questions

4,194 software developer java interview questions shared by candidates

Given a large file that does not fit in memory (say 10GB), find the top 100000 most frequent phrases. The file has 50 phrases per line separated by a pipe (|). Assume that the phrases do not contain pipe. Example line may look like: Foobar Candy | Olympics 2012 | PGA | CNET | Microsoft Bing …. The above line has 5 phrases in visible region.
avatar

Java Software Developer

Interviewed at Wallet Hub

4.2
Jan 26, 2016

Given a large file that does not fit in memory (say 10GB), find the top 100000 most frequent phrases. The file has 50 phrases per line separated by a pipe (|). Assume that the phrases do not contain pipe. Example line may look like: Foobar Candy | Olympics 2012 | PGA | CNET | Microsoft Bing …. The above line has 5 phrases in visible region.

1. so let's say for a use case you need to pick up a list implementation and you have to pick between arraylist and link list which one you will pick and why 2. if we have to insert at the head or the tail then i would accept that okay that link list will be faster because you just have to switch the pointers but if you want to insert let’s say in the middle how many operations you would need in link list versus in array list for in the middle 3. in array list we have to shift the elements so you think the shifting of the elements will happen one by one like one element at it 4. can you explain to me how hashmaps work 5. and the worst case what will be the complexity 6. let’s say we have to use employee class object as a key in the map what we have to take care of 7. are the fields in the employee class mutable or should they be immutable 8. is the hashmap thread safe 9. what alternatives do we have we can use synchronized map we can use concurrent collections in which we have a concurrent hashmap as well 10. so synchronized map versus concurrent hashmap what was the difference 11. in a concurrent hashmap at a given point at the same time let’s say how many threads can do a put operation 12. what is the volatile keyword .
avatar

Java Software Engineer

Interviewed at 360T Trading Networks

3.4
Dec 30, 2025

1. so let's say for a use case you need to pick up a list implementation and you have to pick between arraylist and link list which one you will pick and why 2. if we have to insert at the head or the tail then i would accept that okay that link list will be faster because you just have to switch the pointers but if you want to insert let’s say in the middle how many operations you would need in link list versus in array list for in the middle 3. in array list we have to shift the elements so you think the shifting of the elements will happen one by one like one element at it 4. can you explain to me how hashmaps work 5. and the worst case what will be the complexity 6. let’s say we have to use employee class object as a key in the map what we have to take care of 7. are the fields in the employee class mutable or should they be immutable 8. is the hashmap thread safe 9. what alternatives do we have we can use synchronized map we can use concurrent collections in which we have a concurrent hashmap as well 10. so synchronized map versus concurrent hashmap what was the difference 11. in a concurrent hashmap at a given point at the same time let’s say how many threads can do a put operation 12. what is the volatile keyword .

Viewing 3181 - 3190 interview questions

Glassdoor has 4,194 interview questions and reports from Software developer java interviews. Prepare for your interview. Get hired. Love your job.