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 API05 Mar 2010

How do I get the PI value?

The number π is a mathematical constant, the ratio of a circle’s circumference to its diameter, commonly approximated as 3.14159. It has been represented by the Greek letter “π” since the mid-18th century, though it is also sometimes spelled out as “pi” (/paɪ/). From: Wikipedia The code snippet below show you how to obtain the […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API02 Mar 2010

How do I get the minimum or maximum value between two numbers?

The code below show you how to use the Math.min() and Math.max() method call the get the minimum and maximum value between two numbers. As other method in the Math class these methods also overloaded to accept many types of primitive data. package org.kodejava.math; public class GetMinMaxValueExample { public static void main(String[] args) { Double […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API25 Feb 2010

How do I get the absolute value of a number?

The example below show you how to get the absolute value of a number. To get the absolute value or the abs value of a number we use the Math.abs() method call. The Math.abs() method is an overloaded that can accept value in type of double, float, int or long. package org.kodejava.math; public class GetAbsoluteValueExample […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API25 Feb 2010

How do I read data from a buffer into channel?

In this example you’ll see how to read data from buffer using FileChannel.write() method call. Reading from a buffer means that you are writing data into the channel object. In the snippet below the data from our dummy buffer will be read and written into the result.txt file. package org.kodejava.io; import java.io.File; import java.io.FileOutputStream; import […]

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

How do I change the buffer mode between write and read?

A buffer can be read or written. To change the mode between the write mode and read mode we use the flip() method call on the buffer. There are few things that you should know when you change between the write mode to the read mode. A buffer have the capacity, position and limit properties. […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API22 Feb 2010

How do I write data into ByteBuffer using put method?

The snippet below show you how to write some bytes into the java.nio.ByteBuffer object through a call to the put() method. package org.kodejava.io; import java.nio.ByteBuffer; public class BufferPut { public static void main(String[] args) { ByteBuffer buffer = ByteBuffer.allocate(32); buffer.put((byte) 65); buffer.put((byte) 66); buffer.put((byte) 67); buffer.put((byte) 68); buffer.put((byte) 69); // Writes a sequence of bytes […]

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.