Welcome to "Coding Center"!! Coding Center is the place where you will find something new to learn about Java and Python. If you are looking to brush up on your skills before going for an interview, this article is for you...

 

Tricky Core Java Interview Questions



In this post, we are going to cover all the tricky questions that can be asked on a Java Developer interview. This post is going to be updated with time to time, so if you have to bookmark it, do it because it can be really helpful to brush up before going for an interview.

So, let's start...


  1. Can you override a private method in java?
  2. Can you override a static method in java? Or what is method hiding?
  3. What will happen if you put a key in HashMap which is already there?
  4. What will happen if you try to access a non-static variable from the static method?
  5. Why wait and notify is provided in Object class instead of Thread?
  6. Why wait and notify have to be called from a synchronized method?
  7. Why String is immutable?
  8. Why char array is preferred to store passwords than String?
  9. Write a program to create a deadlock and then fix it.
  10. Will finally be executed if try or catch executes a return statement?
  11. Should you throw or catch an Error?

No comments:

Post a Comment

| Designed by Colorlib