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.

JODA-TIME / CATATAN</>
Joda-Time02 Feb 2012

How do I get date and time fields of DateTime object in Joda-Time?

In Joda-Time the date and time information are divided into fields. The following example show you some fields that can be obtained from the DateTime object. For example to get the day of the year we use the getDayOfYear() method and to get the day of week we can use the getDayOfWeek() method. package org.kodejava.joda; […]

Wayan · 2 menit baca
JODA-TIME / CATATAN</>
Joda-Time02 Feb 2012

How do I get the first day of the next month in Joda-Time?

This example will give you the first day of the next month from the current system date. In the example we use the MutableDateTime class. MutableDateTime is a datetime class whose value can be modified. In the code snippet we start by creating an instance of MutableDateTime class. We add 1 month from the current […]

Wayan · 2 menit baca
JODA-TIME / CATATAN</>
Joda-Time02 Feb 2012

How do I get the last day of a month in Joda-Time?

This example show us how to use Joda-Time’s DateTime class to get the last day of the month. To get the last day of the month we first need to find out the last date of the month. To do this, create a new instance of a DateTime. From the DateTime object get the day-of-the-month […]

Wayan · 2 menit baca
JODA-TIME / CATATAN</>
Joda-Time01 Feb 2012

How do I create DateTime object in Joda-Time?

The following example show you a various way to create an instance of Joda-Time’s DateTime class. By using the default constructor we will create an object with the current system date time. We can also create the object by passing the information like year, month, day, hour, minutes and second. Joda can also use an […]

Wayan · 2 menit baca
JODA-TIME / CATATAN</>
Joda-Time01 Feb 2012

How do I use Joda-Time’s DateMidnight class?

The org.joda.time.DateMidnight class represent a date time information with the time value set to midnight. The following snippet show you how to instantiate this class. package org.kodejava.joda; import org.joda.time.DateMidnight; import org.joda.time.format.DateTimeFormat; public class DateMidnightDemo { public static void main(String[] args) { // Create DateMidnight object of the current system date. DateMidnight date = new DateMidnight(); […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API16 Jan 2012

How do I create array of unique values from another array?

This code snippet show you how to create an array of unique numbers from another array of numbers. package org.kodejava.lang; import java.util.Arrays; public class UniqueArray { /** * Return true if num appeared only once in the array. */ public static boolean isUnique(int[] numbers, int num) { for (int number : numbers) { if (number […]

Wayan · 1 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.