Profile

Cover photo
Anshudeep Bajpai
16 followers|168,746 views
AboutPostsPhotosVideos

Stream

Anshudeep Bajpai

Shared publicly  - 
 
CountDownLatch in Java Concurrency - CountDownLatch can be visualized as a latch that is released only after the given number of events occur. CountDownLatch is initialized with that count (given number of events).
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
Collecting in Java Stream API, there are two variants of map method, Collectors class has many static methods.
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
ConcurrentHashMap is also a hash based map like HashMap, how it differs is the locking strategy used by ConcurrentHashMap. Unlike HashTable (or synchronized HashMap) it doesn't synchronize every method on a common lock. Concu...
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
Converting string to byte array and byte array to String Java program. String has getBytes() method for converting to byte array.
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
Map operation in Java Stream API
Map operations, as the name suggests, are used to do the element mapping from one stream to another. Map operation will return
a stream consisting of the results of applying the given function to the elements of this stream. So, whatever function is
provi...
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
CopyOnWriteArrayList is also an implementation of the List interface but it is a thread safe variant. This thread safety is achieved by making a fresh copy of the underlying array with every mutative operations.
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
FlatMap in Java
If you know about the mapping operation in Java stream , in mapping operation the given function is applied to all the
elements of the stream. Where as flattening a structure , in simple terms, means bringing all the nested structures at the same level. If...
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
Collecting in Java Stream API
Collect method is used to perform a mutable reduction operation on the element of the given stream. A mutable reduction operation can be defined as an operation that accumulates input elements into a mutable result container,
such as a Collection or String...
Collecting in Java Stream API, there are two variants of map method, Collectors class has many static methods.
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
Java program to convert string to float using parseFloat() and valueOf() methods.
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
1
Add a comment...

Anshudeep Bajpai

Shared publicly  - 
 
String objects are immutable in Java therefore they are also thread safe. Whenever content of the String is changed, a new String is created and the reference is changed. Same thing will happen in case of multiple threads too...
1
Add a comment...
Story
Introduction
Bragging rights
Working in IT from last 12 years!
Links
Contributor to