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 API22 Sep 2006

How do I format a number?

If you want to display some numbers that is formatted to a certain pattern, either in a Java Swing application or in a JSP file, you can utilize NumberFormat and DecimalFormat class to give you the format that you want. Here is a small example that will show you how to do it. In the […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API19 Sep 2006

How do I convert string of time to time object?

You want to convert a string representing a time into a time object in Java. As we know that Java represents time information in a class java.util.Date, this class keep information for date and time. Now if you have a string of time like 15:30:18, you can use a SimpleDateFormat object to parse the string […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API16 Sep 2006

How do I use LineNumberReader class to read file?

In this example we use LineNumberReader class to read file contents. What we try to do here is to get the line number of the read data. Instead of introducing another variable; an integer for instance; to keep track the line number we can utilize the LineNumberReader class. This class offers the getLineNumber() method to […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API12 Sep 2006

How do I get user home directory name?

package org.kodejava.lang; public class UserHomeExample { public static void main(String[] args) { // This is the key that we used to obtain user home directory // in the operating system String userHome = "user.home"; // We get the path by getting the system property with the // defined key above. String path = System.getProperty(userHome); // […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API09 Sep 2006

How do I get operating system name and version?

package org.kodejava.lang; public class OperatingSystemInfo { public static void main(String[] args) { // The key for getting operating system name String name = "os.name"; // The key for getting operating system version String version = "os.version"; // The key for getting operating system architecture String architecture = "os.arch"; System.out.println("Name : " + System.getProperty(name)); System.out.println("Version: " […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API07 Sep 2006

How do I add a delay in my program?

You have a problem that you want to add a delay for a couple of seconds in your program. Using Thread.sleep() method we can add delay in our application in a millisecond time. The Thread.sleep() need to be executed inside a try-catch block, and we need to catch the InterruptedException. Let’s see the code snippet […]

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.