Barclay Java Interview Questions

Upasana | April 23, 2019 | 2 min read | 163 views


OOP concepts

  • What is pass-by-value and pass-by-reference? Which mechanism is being used by Java?

Concurrency and multi-threading

  • What is an Immutable Class? Why is it important in multi-threading context? Can you write a Custom immutable class? What are semantics for writing an Immutable Class in java?

  • What is difference between sleep() and wait() method?

  • What is difference between Executor Framework and ForkJoinPool?

  • What is difference between Executor.submit() and Executor.execute() method?

  • What is ThreadLocal variable in Java?

  • How Garbage Collection works in Java, explain the underlying mechanism for any one of the Garbage Collector? Give few names of existing garbage collectors?

Collections framework

  • Write a code to iterate over a standard hashmap object in Java.

  • How will you use your custom Object as a Key inside hashing data-structure (Hashmap, ConcurrentHashmap, hashSet, etc.)?

  • What all things to keep in mind when you use Hashmap in multi-threaded environment?

  • Explain the working of put and get method of a hashmap class? How does equals() and hashcode() comes into picture there?

  • Write a code in java to remove elements of an array while iterating over it.

  • Discuss how HashSet works internally in java?

Algorithm problems

  • Write a recursive Java program to print Fibonacci Series?

  • How will find if the given input string is palindrome?

Design problems

  • What is Composite design pattern

  • Explain Decorator design pattern

  • Discuss through example, The Producer Consumer problem.

  • How will you design a distributed algorithm for Prime Number generation in Java? Discuss the Design only.

Misc problems

  • Explain database normalization and its various usages.

  • What are top 10 coding standards for code reviews in Java?


Top articles in this category:
  1. Sapient Global Market Java Interview Questions and Coding Exercise
  2. Morgan Stanley Java Interview Questions
  3. Citibank Java developer interview questions
  4. UBS Java Interview Questions
  5. Goldman Sachs Java Interview Questions
  6. ION Trading Java Interview Questions
  7. Multi-threading Java Interview Questions for Investment Bank

Recommended books for interview preparation:

Find more on this topic:
Buy interview books

Java & Microservices interview refresher for experienced developers.