Choosing the right data structure is vital to get the job done with proper space vs performance trade-offs. Q1. What are the common data structures, and where would you use…
…Choosing the right data structure is vital to get the job done with proper space vs performance trade-offs. Q1. What are the common data structures, and where would you use…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
A stream is an infinite sequence of consumable elements (i.e a data structure) for the consumption of an operation or iteration. Any Collection<T> can be exposed as a stream. It…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
Q1. Have you seen job advertisements requiring Java candidates to work in real-time or high volume transaction processing systems? A1. If you are applying for such jobs, you can be quizzed on…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
Q1. When is an object needs to implement the Comparable interface? a) When adding it to a HashSet. b) When adding it to a TreeSet. c) When adding it to…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
Sorting objects in Java interview Q&As especially understanding Comparable & Comparator interfaces in Java for natural & custom sorting respectively. Q1. If I mention the interface names Comparable or Comparator,…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
HashMap & HashSet are not only one of the frequently used data structures, but also one of the popular interview topics. Q1. How does a HashMap store data? A1. As…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
Q1. What are the differences between Iterator<T> Vs Iterable<T>?
A1. The “Iterable” was introduced to be able to use in the “foreach” loop. A class implementing the Iterable interface can be iterated over. For example,
1 |
public interface Collection<E> extends Iterable<E> |
Hence, it can be used in the foreach loop
Q1 If Java did not have a Stack implementation, how would you go about implementing your own? A1 1) Determine the backing data structure (e.g. array, linked list, etc). 2)…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
List, Set, Map, and Queue(access the ends FIFO or LIFO) are the basic Java data structure interfaces for which there are different implementations to cater for different usage patterns. Java…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs
Q1. What is the purpose of a Map interface in Java collection API? A1. A map is a set of associations between pairs of objects. One is known as a…
Login Register 100+ Free Java interview FAQs 100+ Free Big Data interview FAQs