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:
some of the frequently asked interview questions are as follows:
- OOPS
- Basic programming(sorting,searching etc..)
- Exception handling
- Multi threading
- system design
- jvm
- collections
some of the frequently asked interview questions are as follows:
- 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.
- 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?
- What is the ThreadLocal class? How and why would you use it?
- What is the volatile keyword? How and why would you use it?
- Compare the sleep() and wait() methods in Java, including when and why you would use one vs. the other.
- 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.
- How can you catch an exception thrown by another thread in Java?
- What is the Java Classloader? List and explain the purpose of the three types of class loaders.
- When designing an abstract class, why should you avoid calling abstract methods inside its constructor?
- What variance is imposed on generic type parameters? How much control does Java give you over this?
- If one needs a Set, how do you choose between HashSet vs. TreeSet?
- What are method references, and how are they useful?
- How are Java enums more powerful than integer constants? How can this capability be used?
- What does it mean for a collection to be “backed by” another? Give an example of when this property is useful.
- What is reflection? Give an example of functionality that can only be implemented using reflection.
- What are static initializers and when would you use them?
- Nested classes can be static or non-static (also called an inner class). How do you decide which to use? Does it matter?
- A third party library is throwing NoClassDefFoundError or NoSuchMethodError, even though all your code compiles without error. What is happening?
- 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