Blog: mkyong (Yong Mook Kim)

206 blogs updated: 3 min. ago
Java 8 - How to convert Iterator to Stream
In Java 8, we can use to convert an Iterator into a Stream. // Iterator -> Spliterators -> Stream Stream stream = Strea...
25-03-2020 06:24:48 mkyong (Yong Mook Kim) Beginners
Java Iterator examples
A few of Java Iterator and ListIterator examples. 1. Iterator 1.1 Get Iterator from a List or Set, and loop over it. JavaIteratorExample1a.j...
20-03-2020 08:00:20 mkyong (Yong Mook Kim) Beginners
What is new in Java 14
Java 14 reached General Availability on 17 March 2020, download Java 14 here. Some new features in Java 14. JEP 305: Pattern Matching for in...
19-03-2020 08:38:34 mkyong (Yong Mook Kim) Beginners
Java List throws UnsupportedOperationException
Typically, we use Arrays.asList or the new Java 9 List.of to create a List. However, both methods return a fixed size or immutable List, it ...
18-03-2020 10:07:41 mkyong (Yong Mook Kim) Beginners
What is java.util.Arrays$ArrayList?
The java.util.Arrays$ArrayLis t is a nested class inside the Arrays class. It is a fixed size or immutable list backed by an array. Arrays.j...
17-03-2020 10:45:41 mkyong (Yong Mook Kim) Beginners
Java 8 - Find duplicate elements in a Stream
This article shows you three algorithms to find duplicate elements in a Stream. Set.add() Collectors.groupingBy Collections.frequency At the...
16-03-2020 10:20:42 mkyong (Yong Mook Kim) Beginners
Java 8 - Get the last element of a Stream?
In Java 8, we can use reduce or skip to get the last element of a Stream. 1. Stream.reduce package com.mkyong; import jav...
15-03-2020 10:00:45 mkyong (Yong Mook Kim) Beginners
Is Comparator a function interface, but it has two abstract methods?
Review the Comparator class; it has two abstract methods, why it can be a function interface? package java.util; @Functional...
14-03-2020 10:07:34 mkyong (Yong Mook Kim) Beginners
How to pad a String in Java?
This article shows you how to use the JDK1.5 String.format() and Apache Common Lang to left or right pad a String in Java. 1. String.format ...
12-03-2020 16:25:32 mkyong (Yong Mook Kim) Beginners
Java - How to display % in String.Format?
This example shows you how to display a percentage % in String.format. package com.mkyong; public class JavaStringFor...
12-03-2020 09:57:45 mkyong (Yong Mook Kim) Beginners

© Jiri Pinkas | this project on GitHub | related: JavaVids | Maven Central Repository Search | Java školení | Top SQL Blogs | monitored using: sitemonitoring

Top Java Blogs is a Java blog aggregator (with English-written blogs only) focused on Java SE, Java EE, Spring Framework and Hibernate.