Quantcast
Channel: HowToDoInJava
Browsing all 22 articles
Browse latest View live

How to find duplicate words in a string in java

This is very common interview question where you have to find duplicate words in a string or some text. This can be solved using some overly-complex algorithms also, but in this post, I will propose...

View Article


Popular HashMap and ConcurrentHashMap interview questions

In my previous post related to “How HashMap works in java“, I explained the internals of HashMap class and how they fit into whole concept. But when interviewer ask you about HashMap related concepts,...

View Article


Useful java collection interview questions

Without argument, java collections is one of the most important area where you will be tested in any position whether junior or senior. The scope is so much wide, that its almost impossible to cover...

View Article

Java Iterate List Examples

To iterate list in java is very basic operation, but over the years it’s gone through some significant changes. We will go through all these changes in given examples. The post Java Iterate List...

View Article

How to Find Duplicate Words in String in Java

This is very common interview question where you have to find duplicate words in a string or some text. This can be solved using some overly-complex algorithms also, but in this post, I will propose...

View Article


Popular HashMap and ConcurrentHashMap Interview Questions

In my previous post related to “How HashMap works in java“, I explained the internals of HashMap class and how they fit into whole concept. But when interviewer ask you about HashMap related concepts,...

View Article

Top Java Collection Interview Questions

Without argument, java collections is one of the most important area where you will be tested in any position whether junior or senior. The scope is so much wide, that its almost impossible to cover...

View Article

Java Iterate List Examples

To iterate list in java is very basic operation, but over the years it’s gone through some significant changes. We will go through all these changes in given examples. The post Java Iterate List...

View Article


Create List with Single Element

Learn to create List instances with only one element in it using Arrays.asList() and Collections.singletonList() methods. Using Collections.singletonList() Method [ Immutable List ] This is simplest...

View Article


How to Find Duplicate Words in String in Java

This is very common interview question where you have to find duplicate words in a string or some text. This can be solved using some overly-complex algorithms also, but in this post, I will propose...

View Article

Popular HashMap and ConcurrentHashMap Interview Questions

In my previous post related to “How HashMap works in java“, I explained the internals of HashMap class and how they fit into whole concept. But when interviewer ask you about HashMap related concepts,...

View Article

Top Java Collection Interview Questions

Without argument, java collections is one of the most important area where you will be tested in any position whether junior or senior. The scope is so much wide, that its almost impossible to cover...

View Article

Java Iterate List Examples

To iterate list in java is very basic operation, but over the years it’s gone through some significant changes. We will go through all these changes in given examples. The post Java Iterate List...

View Article


How HashMap works in Java

Learn how hashmap works internally in java with example. Learn the hashmap internal implementation analysis, collision resolution and Java 8 hashmap update. The post How HashMap works in Java appeared...

View Article

Java TreeMap class

TreeMap in Java is used to store key-value pairs very similar to HashMap class. Difference is that TreeMap provides an efficient way to store key/value pairs in sorted order. It is a red-Black tree...

View Article


Java Spliterator interface

Java Spliterator interface is an internal iterator that breaks the stream into the smaller parts. These smaller parts can be processed in parallel. In real life programming, we may never need to use...

View Article

Java PriorityQueue class

Java PriorityQueue example. PriorityQueue class is a queue data structure implementation in which objects are processed based on their priority. The post Java PriorityQueue class appeared first on...

View Article


Java PriorityBlockingQueue class

Java PriorityBlockingQueue class is concurrent blocking queue data structure implementation in which objects are processed based on their priority. The “blocking” part of the name is added to imply the...

View Article

Java ArrayBlockingQueue class

ArrayBlockingQueue class is Java concurrent and bounded blocking queue implementation backed by an array. It orders elements FIFO (first-in-first-out). The head of the ArrayBlockingQueue is that...

View Article

Java TransferQueue – Java LinkedTransferQueue class

Java TransferQueue is a concurrent blocking queue implementation in which producers may wait for receipt of messages by consumers. LinkedTransferQueue class is an implementation of TransferQueue in...

View Article
Browsing all 22 articles
Browse latest View live