Sunday, April 19, 2015

Barclay Java Interview Questions

  1. 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 ?
  2. How will you use your custom Object as a Key inside hashing datastructure (Hashmap, ConcurrentHashmap, hashSet, etc.)?
  3. Explain the working of put and get method of a hashmap class ? How does equals() and hashcode() comes into picture there ?
  4. What is difference between Executor Framework and ForkJoinPool ?
  5. What is difference between Executor.submit() and Executor.execute() method ?
  6. Write a code to iterate over a standard hashmap object in Java.
  7. What all things to keep in mind when you use Hashmap in multi-threaded environment ?
  8. What is difference between sleep() and wait() method ?
  9. What is Composite Design Pattern ?
  10. Write a code in java to remove elements of an array while iterating over it.
  11. What is ThreadLocal variable in Java ?
  12. What is pass-by-value and pass-by-reference ? Which mechanism is being used by Java ?
  13. Discuss through example, The Producer Consumer problem.
  14. Discuss how HashSet works internally in java ?
  15. Explain database normalization and its various usages.
  16. What are top 10 coding standards for code reviews in Java ?
  17. Write a recursive Java program to print Fibonacci Series ?
  18. How will you design a distributed algorithm for Prime Number generation in Java ? Discuss the Design only.
  19. How Garbage Collection works in Java, explain the underlying mechanism for any one of the Garbage Collector ? Give few names of existing garbage collectors ?

1 comment:

Your comment will be published after review from moderator