- What is an abstract class? Where can it be applied?
- What does the word interface mean in java?
- What are inner classes? How many different ways are used to implement inner classes?
- What is object cloning?
- How is a shallow copy different from a deep copy? Why would you use one over the other?
- What advantage does coding to an interface offer?
- What happens when the JVM is initialized?
- How are exceptions handled in Java?
- What is the importance of the finally block?
- Why should you avoid the use of printStackTrace()?
- What are the only few cases where you should extend Runtime Exception?
- What are the three elements of PIE and why are they important?
- How is abstraction implemented in Java?
- Does Java use call-by-value or call-by-reference?
- Where do objects and primitives live in memory?
- What is the difference between StringBuilder and StringBuffer?
- What are some ways of increasing the efficiency of your system?
- What are some applications of Enums?
- What are access modifiers?
- What is JDBC technology? Why is it needed?
- What does Class.forName() accomplish?
- What are the three objects JDBC uses to objectify SQL statements?
- What are the various types of JDBC drivers?
- What are the uses of a JDBC DataSource?
- What is JDBC connection pooling?
- What are the functions of DriverManager?
- What does the JDBC driver do? Which is the right type of driver for an application?
- What are the different layers that the JDBC architecture defines ?
- What are RowSets?
- Define the steps to JDBC Connectivity.
- How are arrays represented in Java?
- How does synchronization work in inheritance?
- Is there a way to make sure your thread has completed execution?
- How do you detect a deadlock in Java?
- What is the best way to create a thread?
- What are some applications of the single-threaded model?
- What is the fork and join model and how is it implemented in Java?
- What is the difference between sleep() and wait() methods?
- Explain synchronized and volatile keywords.
- What is the best way of using guarded blocks?
- Where would you use the wait() method?
- When would you use the notify() method as opposed to notifyAll() method?
- What are the various stages in the life cycle of a thread?
- What are Re-entrant locks?
- How do you implement the Read-Write Lock pattern?
- What is the Producer Consumer pattern? How can you implement it in Java?
- What are Lock objects? How do they work?
- How can you use task scheduling in Java?
- What are atomic variables? How are they useful?
- How do you use ThreadLocal?
- How will you define lock scope? In what ways can you implement it in Java?
- What is lock fairness? Is it achievable?
- How do you nest locks in java?
- Give an example of a deadlock. How do resolve a deadlock situation?
- What are semaphores?How many different kinds of semaphores are there?
- What does mutex mean? How is it different from a monitor?
- What is a condition or event variable?
- How would you describe a synchronization barrier? Is it the same as a critical section?
- What is a countdown latch? How is it different from an exchanger?
- How do you detect deadlocks?
- Does the JVM handle deadlocks? How can you prevent your application from going into a deadlock?
- What is an automatic lock release? How does it work?
- How do timeouts work in deadlock resolution?
- What is lock starvation? How is different from CPU starvation?
- How does synchronization work for a recursive function?
- Can you call non-synchronized methods on an object under lock?
- How does synchronization work on a static level?
- Describe the new thread pooling feature added in Java 5.
- How do you define a data structure?
- What algorithms have been provided by Java for iterating through a data structure?
- What is the difference between implementing the Comparable vs the Comparator interfaces?
- What is key collision and how can it be resolved?
- What is an unbounded queue?
- What advantages does a CopyOnWrite data structure offer?
- Which data structures are represented in Java? (Map, List, Set, Queue, Stack, Tree, Trie)
- How is a HashMap different from a Hashtable?
- Why would you use a Linked data structure?
- What advantages does a Concurrent data structure offer?
- What are thread-aware classes?
- How does an iterator solve the concurrent modification problem?
- What advantage does a thread-safe collection offer over a non-thread-safe one?
- How has thread-notification been implemented in the Java Collections framework?
- What is an Enumeration? How is it used? How is it different from an Iterator?
- Can you remove elements from the middle of a Queue?
- What is the advantage of using the volatile keyword?
- How is the transient keyword applied?
- Which implementation of FIFO is available in Java?
- How about LIFO? What are the advantages of the various implementations?
Shalini's Bank of Java Interview Questions
Core Java
Subscribe to:
Posts (Atom)