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.

AWT / CATATAN</>
AWT10 Jun 2006

How do I read image file?

Here you see a code sample to read an image file. This code will work either the image file is located in a file folder or inside a jar file. You can use javax.imageio.ImageIO class to read the image file. package org.kodejava.awt; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; public class ReadingImage { public […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API09 Jun 2006

How do I get a localhost hostname?

package org.kodejava.network; import java.net.InetAddress; import java.net.UnknownHostException; public class HostNameExample { public static void main(String[] args) { try { InetAddress address = InetAddress.getLocalHost(); System.out.println("Hostname: " + address.getHostName()); } catch (UnknownHostException e) { e.printStackTrace(); } } } An example of output produce by the code snippet above is: Hostname: Krakatau

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API06 Jun 2006

How do I get a list of weekday names?

The example code below helps you to get all weekday names as an array of string. The first method, getWeekdays() return the full name string while the second method getShortWeekdays() return the short name of the weekday. package org.kodejava.text; import java.text.DateFormatSymbols; public class WeekdayNames { public static void main(String[] args) { DateFormatSymbols dfs = new […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API05 Jun 2006

How do I get a list of month names?

The example code below helps you to get all month names as an array of String. The first method, getMonths() return the full name string while the second method getShortMonths() return the short name of the month. package org.kodejava.text; import java.text.DateFormatSymbols; import java.util.Locale; public class MonthNames { public static void main(String[] args) { String[] months […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API02 Jun 2006

How do I convert primitive boolean type into Boolean object?

The following code snippet demonstrate how to use the Boolean.valueOf() method to convert primitive boolean value or a string into Boolean object. This method will return the corresponding Boolean object of the given primitive boolean value. When a string value is passed to this method it will return Boolean.TRUE when the string is not null, […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API29 Mei 2006

Can I create a boolean variable from string?

To convert a string into boolean we can use the Boolean.parseBoolean(String) method. If we pass a non null value that equals to true, ignoring case, this method will return true value. Given other values it will return a false boolean value. package org.kodejava.lang; public class BooleanParseExample { public static void main(String[] args) { // Parsing […]

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.