Hacker News new | ask | show | jobs
by qollin 5707 days ago
If I interview Java programmers I always start with letting them write a method to reverse a String on the whiteboard. ~30% fail, for the others it's an easy warmup. I then ask how much memory this method consumes and if they could think of a better way to do it if this were C and not Java. This leads to the concept of immutability of Strings and you now can have a discussion on why the Java folks chose to make String immutable in the first place...