Landing a Job as a Java Developer
Although some new programmers might question Java’s relevance in today’s tech world, it’s an incredibly popular choice for coders looking to work as a developer. There are more than nine million Java developers worldwide, and more than three billion smart phones run on Java today. The recent success of Java8 is a promising indication that the language will dominate the software development landscape for years to come.
Hiring managers will tell a student that Java is one of the most in-demand skills they can learn. The question is how can students best prepare for the notoriously difficult interview questions when trying to land their first job?
Going in, students should know that they can be questioned on any version of Java to date, and that many developer job interviews are conducted at least partially in writing. This means the interviewee will be expected to perform the answer on a whiteboard or on paper.
Here is an example of how part of an interview might go, and suggested answers:
Q: Describe what all the different parts of the main() method declaration mean, and describe what each does.
A: Public, static, void, main, String  and args. Public implies that the method is visible in all places. Static means that an instant of the class isn’t needed to call the method. Void indicates that the method doesn’t return anything. Main is simply the predefined method name for how one should start a Java program, and String  means the method will accept an array of strings as arguments to the method. Args is the name of the method’s parameter – the programmer can use any name here. There’s no rule the parameter must be called ‘args.’
Q: What is the main difference in fail-fast and fail-safe iterators?
A: Whether the collection can be modified while it’s being iterated. Fail-fast iterators do not allow this and fail-safe iterators do.
Q: Why is it more secure to store sensitive data (passwords, social security information) in a character array over a String?
A: Character arrays are mutable objects. It’s possible to set a character array to ‘blank’ once someone is finished with it, and it won’t be stored in memory. Strings are immutable and always stored in the String pool. Anyone with access to a related memory dump can find the sensitive information.
Q: What is the difference between the sleep method in Java and the wait method? What are each used for?
A: Sleep is a blocking operation that either holds the monitor or locks the shared object for a set number of milliseconds, while wait just is a way to pause the thread. Sleep is mostly used for polling or checking for specific results, and wait is more used for in multithread applications to achieve synchronization and avoid race conditions.
There are two rules of thumb for answering any interview question. First, listen carefully to the questions and ask for clarification if you don’t understand — don’t make assumptions about what the interviewer is looking for. Second, listen for hints. Don’t ignore a hint if you suspect one; an interviewer may drop a hint to push an interviewer in the right direction if they feel he or she is a strong candidate for the position.
With any job interview, the most important thing one can do is prepare well. The Software Guild is a fast-paced boot camp program that teaches programming and software development; graduates of the program are well-suited for entry-level positions as Java developers.