Saturday, July 6, 2019

How to prepare for a java developer before the interview

In this post you will know the best way to prepare for a java developer one day before. The following concepts you must be confident in:


  • OOPS
  • Basic programming(sorting,searching etc..)
  • Exception handling
  • Multi threading
  • system design
  • jvm
  • collections



some of the frequently asked interview questions are as follows:


  1. ArrayList, LinkedList, and Vector are all implementations of the List interface. Which of them is most efficient for adding and removing elements from the list? Explain your answer, including any other alternatives you may be aware of.
  2. Why would it be more secure to store sensitive data (such as a password, social security number, etc.) in a character array rather than in a String?
  3. What is the ThreadLocal class? How and why would you use it?
  4. What is the volatile keyword? How and why would you use it?
  5. Compare the sleep() and wait() methods in Java, including when and why you would use one vs. the other.
  6. Tail recursion is functionally equivalent to iteration. Since Java does not yet support tail call optimization, describe how to transform a simple tail recursive function into a loop and why one is typically preferred over the other.
  7. How can you catch an exception thrown by another thread in Java?
  8. What is the Java Classloader? List and explain the purpose of the three types of class loaders.
  9. When designing an abstract class, why should you avoid calling abstract methods inside its constructor?
  10. What variance is imposed on generic type parameters? How much control does Java give you over this?
  11. If one needs a Set, how do you choose between HashSet vs. TreeSet?
  12. What are method references, and how are they useful?
  13. How are Java enums more powerful than integer constants? How can this capability be used?
  14. What does it mean for a collection to be “backed by” another? Give an example of when this property is useful.
  15. What is reflection? Give an example of functionality that can only be implemented using reflection.
  16. What are static initializers and when would you use them?
  17. Nested classes can be static or non-static (also called an inner class). How do you decide which to use? Does it matter?
  18. A third party library is throwing NoClassDefFoundError or NoSuchMethodError, even though all your code compiles without error. What is happening?
  19. What is the difference between String s = "Test" and String s = new String("Test")? Which is better and why?

Finally you should follow these tips also:

Be honest, don't tell lie
Must be in a position to write code
explain your project with efficiently
don't argue with the interviewer
tell about your achievements
Ask questions if you have any doubts related organization culture,policy etc..

No comments:

Post a Comment

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...