My favourite Java interview questions

Below are my favourite Java interview questions which I believe every Java developer must know

1.) How is HashMap implemented in Java.
2.) What is concurrent modification exception and how would you implement it.
3.) What is failsafe in HashMap.
4.)Transitive contract of hashcode,equals.
5.) What is anonymous inner class, Give me an example in Java.
6.) Hashcode and Equals- which needs to overridden and why?
7.) What are different immutable classes in Java and why would you need them and if required how would you make a class immutable.
8.)Exception Handling – What did Java has the concept of checked and unchecked exceptions, explain with example?
9.) How can you add objects of subclasses to a Collection of parent class – Generics. Or can you directly?
10.) init block, static, class loader,constructor, class initialization.
11.) Concurrency, multi-threading.
12.)Flow of a web application. from browser to web app, servlet container, request object, context, filters etc..
13.) Model a class to switch on/off a bulb in a room.
14.) Model elevator class.
15.)Algorithm to find when to buy and sell share (max-sub array problem)
16.) algorithm puzzle

Other :

Then Spring, Hibernate, Transactions, Project experience, Tech stack of project and why?
Web-Services, REST,SOAP,
knowledge of design patterns
knowledge of functional programming, javascript
knowledge of writing unit test cases.
latest, current technologies,
CI,CD,Scrum,Agile,XP.Blogs, Open-source contribution, meetups/conferences.

AND Learning Attitude,

If you have all these apply today 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s