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.

CORE API / CATATAN</>
Core API28 Jun 2010

How do I create a java.util.Hashtable and iterates its contents?

The code snippet shows you how to create and instance of Hashtable that stores Integer values using a String keys. After that we iterate the elements of the Hashtable using the Enumeration interface. package org.kodejava.util; import java.util.Enumeration; import java.util.Hashtable; public class HashtableDemo { public static void main(String[] args) { // Creates an instance of Hashtable […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API23 Jun 2010

How do I create Deque using ArrayDeque class?

This example show you how to create a Deque using the ArrayDeque implementation. The ArrayDeque stores its elements using an array. If the number of elements exceeds the space in the array, a new array will be allocated, and all elements moved the new allocated array. In the code below we initiate the size of […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API22 Jun 2010

How do I read java.util.Vector object using java.util.Enumeration?

The following code snippets show you how to iterate and read java.util.Vector elements using the java.util.Enumeration. package org.kodejava.util; import java.util.Enumeration; import java.util.Vector; public class VectorEnumeration { public static void main(String[] args) { Vector<String> data = new Vector<>(); data.add("one"); data.add("two"); data.add("three"); StringBuilder sb = new StringBuilder("Data: "); // Iterates vector object to read it elements for […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API19 Jun 2010

How do I remove the first or the last found element from Deque?

This example demonstrates the use of Deque.removeFirstOccurrence() method call to remove the first occurrences of an element in the Deque object and Deque.removeLastOccurrence() method call to remove the last occurrences of an element in the Deque object. package org.kodejava.util; import java.util.Deque; import java.util.Iterator; import java.util.LinkedList; public class DequeRemoveDemo { public static void main(String[] args) { […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API17 Jun 2010

How do I create a Last-In-First-Out Deque?

This example show you how to create a LIFO (Last In First Out) Deque. We call the Deque.peekLast() method to get the last element from the Deque, poll the last element and repeat until all the elements read. package org.kodejava.util; import java.util.Deque; import java.util.LinkedList; public class DequeLifoDemo { public static void main(String[] args) { // […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API16 Jun 2010

How do I get Host Default Time Zone ID?

package org.kodejava.util; import java.util.TimeZone; public class HostDefaultTimeZone { public static void main(String[] args) { // Gets the default TimeZone ID for this host String id = TimeZone.getDefault().getID(); System.out.println("Default Time Zone ID: " + id); } } The default timezone id for this host is: Default Time Zone ID: Asia/Shanghai

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.