Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

JAVA 8 / CATATAN</>
Java 824 Jan 2024

How do I use List.replaceAll() method?

The List.replaceAll() method was introduced in Java 8. This method replaces each element of the list with the result of applying the operator to that element. The operator or function you pass to replaceAll() should be a UnaryOperator. Here is a simple example: package org.kodejava.util; import java.util.ArrayList; import java.util.List; import java.util.function.UnaryOperator; public class ListReplaceAllExample { […]

Wayan · 3 menit baca
JAVA 8 / CATATAN</>
Java 824 Jan 2024

How do I use Collection.removeIf() method?

The Collection.removeIf() method was introduced in Java 8, and it allows for the removal of items from a collection using a condition defined in a lambda expression. The primary purpose of the Collection.removeIf() method in Java is to filter out elements from a collection based on a certain condition or predicate. It’s a more efficient […]

Wayan · 3 menit baca
LANG PACKAGE / CATATAN</>
Lang Package24 Jan 2024

What is the purpose of String.strip() method of Java 11?

The purpose of the String.strip() method in Java 11 is to remove whitespaces from both the beginning and end of a string. This is very similar to the String.trim() method available in earlier versions of Java, but there is a key difference between them. Here’s the difference: String.strip(): Introduced in Java 11, strip() uses the […]

Wayan · 4 menit baca
JAVA 9 / CATATAN</>
Java 924 Jan 2024

How do I use Map.of() factory method to create a map object?

In Java, the Map.of() factory method can be used to create an unmodifiable map of specified key-value pairs. This method is available in Java 9 and later versions. Creating a map is a bit more complicated than creating lists or sets. Because we need to provide keys and values when creating a map. When using […]

Wayan · 2 menit baca
JAVA 9 / CATATAN</>
Java 924 Jan 2024

How do I use Set.of() factory method to create a set object?

As with List.of(), in Java 9, the Set.of() factory method can be used to create an unmodifiable set of specified elements. Here is a simple example: package org.kodejava.util; import java.util.Set; public class SetOfExample { public static void main(String[] args) { Set<String> names = Set.of("Rosa", "John", "Mary", "Alice"); for (String name : names) { System.out.println(name); } […]

Wayan · 3 menit baca
JAVA 9 / CATATAN</>
Java 924 Jan 2024

How do I use List.of() factory method to create a list object?

In Java, you can use the List.of() factory method to create an unmodifiable List consisting of specified elements. This method is available from Java 9 onwards. Here is a simple example: package org.kodejava.util; import java.util.List; public class ListOfExample { public static void main(String[] args) { List<String> names = List.of("Rosa", "John", "Mary", "Alice"); for (String name […]

Wayan · 2 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.