r/javahelp • u/Sirinji_ • Jul 04 '20
Java Technical Interview Advice
Hey Guys, I have a technical interview for Java next week, the interviewer will be asking me some concepts about Java. Could you guys give me some general tips and also if you had a previous java technical interview, what general Java questions did they ask you?
Thanks guys!!
2
u/chrisfender0 Jul 04 '20
Hey just explain your thought process when resolving problems on the whiteboard. Make sure to ask questions about the problems, don’t assume you know the solution just ask until you feel like you have the right handle on the question. If you’re confused just explain what you know so they can re-formulate the question. The point in these is mostly to understand how you would fix problems but a major part is how you interact with the staff when given feedback so when you solve the problem just accept the feedback and apply it to the problems at hand.
1
u/xyphanite Quantum Brewer Jul 04 '20
I was in an interview and they asked about memory leaks in Java and I froze .... so, read this https://www.baeldung.com/java-memory-leaks
1
u/xyphanite Quantum Brewer Jul 04 '20
No shit - me too. It happens (memory leaks), but it's not common. That said, it's a question to see if you have a very deep understanding of the JVM.
1
u/cinlung Jul 04 '20
Depending on your level. For entry level and if i were the interviewer, I would ask things like:
Explain Java inheritance.
About life-cycles of Java app, servlets, maybe android for today's standard.
Some common Java modeling such as factory model, singleton, and so on.
How to make sure your app does not overdose with memory leaks
JDBC connection concept.
Some small basic things such as primitive data (data types), etc...
Then more general stuff like what's your take on JDK vs OpenJDK, and why.
Good luck!
1
u/sweepsz Decaf Captain Jul 04 '20
Java generics. Run time type erasure. Data structures. Stream API. Dependency injection via frameworks like spring. We ask questions regarding all of those things.
1
u/younanimous_decision Jul 05 '20
some things that came up for me:
i was pressed on my ability to communicate my reasoning quite a bit. "why did you do it this way? what not that way? can you do it other ways too?"
i was given a mini program specification for a command line utility, asked to write it, then they we did a code review with three devs where they combed through it with a fine tooth comb
one guy liked to ask dumb "gotcha" questions - like putting return statements in a catch() and also in a finally() block and asking which will win
these days i tend to do the interviewing. i like to ask about skills that i think are super important at our workplace, and i like to be open ended and conversational. some things i ask:
streams api. we deal with a lot of data manipulation and mapping. streams api makes life easier for that kind of work, been around since java 8.
sql and databases. although the application is all java and web, you need to be comfortable with the data source.
inversion of control concepts, spring framework in particular
testing if they understand thread safety
one coworker likes to have them write fizzbuzz
0
u/xyphanite Quantum Brewer Jul 04 '20
I've been preparing for interview for about 2 months - I'll post a list with thinks later this afternoon.
1
0
2
u/[deleted] Jul 04 '20
Take a look under the hood on how collections work. For eg WHY is the complexityof an arraylist O(1) when you do a get? Why is it O(n) when you delete something? Why is Hashmap O(1) and so on