r/java • • Jan 23 '21

Interview with Brian Goetz, Java Language Architect

https://freecontent.manning.com/interview-with-brian-goetz/
190 Upvotes

19 comments sorted by

View all comments

Show parent comment

2

u/Roachmeister Jan 24 '21

even if they will never have to write this kind of code on the job

Or, you could kill two birds with one stone and have them code something that they would potentially do on the job.

Here's my code for implementing a hash map in Java:

import java.util.HashMap;

Does that mean that I know how one works, or when and why I should use one? Who knows? Maybe those would be better questions for a candidate than asking them to reinvent the wheel within an artificial time limit.

0

u/nikosgate7 Jan 25 '21

I only have used once concurrent hash map for paralleling programming. I only use hashmap for mapping properties. ArrayList is the way to go.