SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

CORE API / NOTES</>↗
Core API23 Jan 2007

How do I calculate process elapsed time?

This example shows us how to use the System.nanoTime() method to get the amount of time a process take place. Please be aware that the nano time value is not related to the real world time value. package org.kodejava.lang; public class ElapsedTimeExample { public static void main(String[] args) { // Get the start time of […]

Wayan · 1 min read
APPLET / NOTES</>↗
Applet20 Jan 2007

How do I create a Hello World Applet?

The code below demonstrate the very basic of Java applet. Applet is a small Java application that can be embedded on the web browser. package org.kodejava.applet; import java.applet.*; import java.awt.*; public class HelloWorldApplet extends Applet { public void init() { } public void start() { } public void stop() { } public void destroy() { […]

Wayan · 1 min read
AWT / NOTES</>↗
AWT20 Jan 2007

How do I get the available font family names?

package org.kodejava.awt; import java.awt.GraphicsEnvironment; public class FontFamilyNameList { public static void main(String[] args) { // Get all available font family names from GraphicsEnvironment GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); String[] familyNames = ge.getAvailableFontFamilyNames(); // Iterates familyNames array to display the available font's family names for (String familyName : familyNames) { System.out.println("Family nam...

Wayan · 1 min read
AWT / NOTES</>↗
AWT16 Jan 2007

How do I get the available font names?

package org.kodejava.awt; import java.awt.Font; import java.awt.GraphicsEnvironment; public class FontNameList { public static void main(String[] args) { // Get all available fonts from GraphicsEnvironment GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] fonts = ge.getAllFonts(); // Iterates all available fonts and get their name and family name for (Font font : fonts) { String fontName = font.getName(); String familyName […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API13 Jan 2007

How do I parse a number for a locale?

package org.kodejava.text; import java.util.Locale; import java.text.NumberFormat; import java.text.ParseException; public class LocaleNumberParse { public static void main(String[] args) { try { // In this example we are trying to parse a number string in a // defined format. Basically we want to covert the string for a // locale into a correct number value. Number number […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API12 Jan 2007

How do I format a number for a locale?

package org.kodejava.text; import java.util.Locale; import java.text.NumberFormat; public class LocaleNumberFormat { public static void main(String[] args) { // Format number for Italy locale. In Italy locale the decimal point // symbol is a comma. NumberFormat formatter = NumberFormat.getNumberInstance(Locale.ITALY); try { String number = formatter.format(195325.75); System.out.println("Number in Italy: " + number); } catch (NumberFormatException e) { e.printStackTrace(); […...

Wayan · 1 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.