Collectors.joining() Concatenates the input Elements, separated by the Delimiter with provided Prefix and Suffix values. Yesterday I've published an article on StringJoiner(), String.join() which …
Java8 • Tag Archive
Java8 is the next evolution version with lots of valuable APIs. Find here list of 50+ Java8 tutorials which we published on Crunchify. Java 8 Tutorial for Beginners – Learn Java 8 in simple and easy steps.
In Java How to find a Line with Maximum Number of Words? Using Stream.forEach() Iterator
For any given file, Write a Java program to find a line with maximum number of words in it is a very common interview question. In other words, write a Java program to find longest line from …
How to Sort a HashMap by Key and Value in Java 8 – Complete Tutorial
In Java 8 – How to sort a Map? On Crunchify we have written almost ~400 java tutorials and this one is an addition to Java8 category. I love Java collection and have multiple tutorials on How to …
Read Article about How to Sort a HashMap by Key and Value in Java 8 – Complete Tutorial →
Difference between String, StringBuffer and StringBuilder in Java – Example attached
In this Java tutorial we will go over difference between Java String, StringBuffer and StringBuilder. Let's get started: String: The String class represents character strings. All string …
In Java How to remove Elements while Iterating a List, ArrayList? (5 different ways)
In Java How to remove elements from ArrayList while iterating? The list.remove(s) will throws java.util.ConcurrentModificationException, if you remove an item from an ArrayList while iterating …
Java Stream API Operations and Lambda Expression Tutorial
Java is a collection of APIs and with the introduction of Java 8, we do have more choice than before. java.util.stream API supports functional-style operations on streams of elements, such as …
Read Article about Java Stream API Operations and Lambda Expression Tutorial →
How to Read a File line by line using Java Stream – Files.lines() and Files.newBufferedReader() Utility APIs
Java 9 already in full swing and ready for feature complete by end of May. Even though Java 8 released couple of years back, I'm sure there are very few companies moved to even Java 8 JDK for their …
All in one Java Regex, Matcher Pattern and Regular Expressions Tutorial
In this tutorial we will go over list of Matcher (java.util.regex.Matcher) APIs. Sometime back I've written a tutorial on Java Regex which covers wide variety of samples. Regular Expression is a …
Read Article about All in one Java Regex, Matcher Pattern and Regular Expressions Tutorial →
In Java how to Set File Permission on a File using PosixFilePermission? Understanding chmod command
How to set File Permission in Java? Here is a simple example of setting up file permission on any provided file. If you are part of Operations business unit of any company then it's very important …
What is RegEx (Regular Expression) Pattern? How to use it in Java? Example Attached
What is RegEx? Regular Expression is a search pattern for String. java.util.regex Classes for matching character sequences against patterns specified by regular expressions in Java. You …
Java 8 java.time.temporal. TemporalAdjusters and Stream.flatMap() Tutorial
It's been almost 2 years Java 8 was released, March 2014. I'm sure most of the companies still using Java 7 with Apache Tomcat in their production environment but recently it's picking up some …
Read Article about Java 8 java.time.temporal. TemporalAdjusters and Stream.flatMap() Tutorial →
Java StringJoiner, String.join() and Collectors.joining() Tutorial with all Details – 5 Different ways
Java Developer Platform 8 (Java8) is around since almost 3 years. We have published more than 10 different tutorials on Crunchify with all different abilities and handy utilities. Moving from one …