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 817 Jan 2024

How do I use TemporalAdjusters firstDayOfMonth() method?

The TemporalAdjusters.firstDayOfMonth() method in Java is used to obtain a copy of the current date with the day set to the first day of the current month. This method is quite simple to use. You need to import the java.time package and use the with() function in conjunction with TemporalAdjusters.firstDayOfMonth(). Here’s a simple example in […]

Wayan · 1 menit baca
JAVA 8 / CATATAN</>
Java 817 Jan 2024

How do I use TemporalAdjusters dayOfWeekInMonth() method?

dayOfWeekInMonth() is a handy method in java.time.temporal.TemporalAdjusters class that returns an adjuster which changes the date to the n-th day of week in the current month. Here is an example of how you could use it: package org.kodejava.datetime; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.temporal.TemporalAdjusters; public class DayOfWeekInMonthExample { public static void main(String[] args) { // […]

Wayan · 2 menit baca
JAVA 8 / CATATAN</>
Java 817 Jan 2024

How do I use java.time.temporal.TemporalAdjusters class?

The java.time.temporal.TemporalAdjuster interface and the java.time.temporal.TemporalAdjusters class are both part of the Java Date-Time API, and they work together for adjusting temporal objects. TemporalAdjuster interface: This is a functional interface, which means it has only one abstract method, adjustInto(). This method is meant to adjust a temporal object, such as LocalDate, LocalDateTime, YearMonth, etc. The […]

Wayan · 5 menit baca
JAVA 8 / CATATAN</>
Java 817 Jan 2024

How do I use java.time.Duration class?

java.time.Duration is another useful class in Java for dealing with time. It measures time in seconds and nanoseconds and is most suitable for smaller amounts of time, like “20 seconds” or “3 hours”, and not for larger units like “3 days” or “4 months”. Here’s a guide on how to use it: 1. Creating a […]

Wayan · 2 menit baca
JAVA 8 / CATATAN</>
Java 817 Jan 2024

How do I use java.time.Period class?

java.time.Period is a class that represents a quantity or amount of time in terms of years, months, and days. Here’s a brief guide on how to use it: 1. Creating a Period instance The Period class provides several static methods named of() and between() to create an instance. To create Period of 1 year, 2 […]

Wayan · 2 menit baca
JAVA 8 / CATATAN</>
Java 817 Jan 2024

How do I use ChronoUnit enumeration?

ChronoUnit is an enumeration that provides static constants representing the units of time in the date-time API in Java. These constants include DAYS, HOURS, SECONDS, etc., that are often used to measure a quantity of time with respect to the specifics of a calendar system. Here’s an example of how you can use the ChronoUnit […]

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.