Here is the list of Java interview questions generally being asked these days. I'll sort these questions topic wise later.
Comparison based questions:
- Abstraction vs Encapsulation
- Composition vs Aggregation
- Array List vs Linked List
- Abstract Class vs Interface
- Singleton Class vs Static variable
- Comparator vs Comparable
- Sleep vs Wait
- ClassNotFound vs NoClassDefinitionFound
- Exception vs Error
- List Iterator vs Iterator
- Iterator vs For loop
- For each vs For loop
- StringBuilder vs StringBuffer
- HashMap vs HashTable
- HashSet vs ArrayList
- Serialization vs Externalization
- JVM vs JDK vs JRE
- java.util collection vs java.util.concurrent collection.
- Arrays vs Collections class.
Elaboration Questions:
- Explain Serialization
- Use of serialization
- Explain JVM memory model
- Explain different states of Thread
- Explain Array List growth policy
- Explain Polymorphism
- Why Java does not allow multiple class inheritance
- Is it possible to catch Errors in catch block?
Write a program:
- Write a utility function to swap to strings. The function should take two String parameters and swap them. The swapped result should be visible to the function from which utility was called.
- Write Singleton Class implementation.
- Write an Immutable Class.
- Write a function to reverse the given String.
No comments:
Post a Comment