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 API27 Jun 2006

How do I get the absolute path of a file in Java?

The following code snippet shows you how to get the absolute path of a file. To do this we use the java.io.File object getAbsolutePath() method. package org.kodejava.io; import java.io.File; public class AbsolutePathExample { public static void main(String[] args) { // Create an instance of File called file. File file = new File("README.md"); // Now we […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API25 Jun 2006

How do I convert decimal to octal?

From the code snippet below you will learn how to convert decimal to an octal string and converting back from a string of octal number to decimal. For the first conversion we can utilize the Integer.toOctalString() method. This method takes an integer number and will return the string that represent the corresponding octal number. To […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API20 Jun 2006

How do I convert decimal to binary?

In this example you will learn how to convert decimal number to binary number. To convert decimal number to binary we can use Integer.toBinaryString() method. This method takes a single parameter of integer and return a string that represent the equal binary number. If you want to convert the other way around, from binary string […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API19 Jun 2006

How do I get file size in Java?

This example will show you how to get the size of a file. To obtain the size of a file you can use the File‘s length() method. The length() method return the file size in bytes. package org.kodejava.io; import java.io.File; public class FileSize { public static void main(String[] args) { File file = new File("README.md"); […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API15 Jun 2006

How do I get file’s last modification date?

To get file last modification date we can use the lastModified() method of the File class. This method returns a long value. After getting this value you can create an instance of java.util.Date class and pass this value as the parameter. This Date will hold the file’s last modification date. package org.kodejava.io; import java.io.File; import […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API11 Jun 2006

How do I convert decimal to hexadecimal?

To convert decimal number (base 10) to hexadecimal number (base 16) we can use the Integer.toHexString() method. This method takes an integer as parameter and return a string that represent the number in hexadecimal. To convert back the number from hexadecimal to decimal number we can use the Integer.parseInt() method. This method takes two argument, […]

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.