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 API14 Mar 2006

How do I create and write data into text file?

Here is a code example for creating text file and put some texts in it. This program will create a file called write.txt. To create and write a text file we do the following steps: File file = new File("write.txt"); FileWriter fileWriter = new FileWriter(file); BufferedWriter bufferedWriter = new BufferedWriter(fileWriter); Below is the complete code […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API13 Mar 2006

How do I read a text file using BufferedReader?

The code snippet below is an example of how to read a text file using BufferedReader class from the java.io package. This snippet read a text file called README.md and print out its content. To create an instance of java.io.BufferedReader we do the following steps: File file = new File("README.md"); FileReader fileReader = new FileReader(file)); […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API08 Mar 2006

How do I read a configuration file using java.util.Properties?

When we have an application that used a text file to store a configuration, and the configuration is typically in a key=value format then we can use java.util.Properties to read that configuration file. Here is an example of a configuration file called app.config: app.name=Properties Sample Code app.version=1.0 The code below show you how to read […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API06 Mar 2006

How do I convert a collection object into an array?

To convert collection-based object into an array we can use toArray() or toArray(T[] a) method provided by the implementation of Collection interface such as java.util.ArrayList. package org.kodejava.util; import java.util.List; import java.util.ArrayList; public class CollectionToArrayExample { public static void main(String[] args) { List<String> words = new ArrayList<>(); words.add("Kode"); words.add("Java"); words.add("-"); words.add("Learn"); words.add("Java"); words.add...

Wayan · 1 min read
CORE API / NOTES</>↗
Core API02 Mar 2006

How do I convert an array into a collection object?

To convert array based data into List / Collection based we can use java.util.Arrays class. This class provides a static method asList(T… a) that converts array into List / Collection. package org.kodejava.util; import java.util.Arrays; import java.util.List; public class ArrayAsListExample { public static void main(String[] args) { String[] words = {"Happy", "New", "Year", "2021"}; List<String> list […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API28 Feb 2006

How do I add or subtract a date?

The java.util.Calendar allows us to do a date arithmetic function such as add or subtract a unit of time to the specified date field. The method that done this process is the Calendar.add(int field, int amount). Where the value of the field can be Calendar.DATE, Calendar.MONTH, Calendar.YEAR. So this mean if you want to subtract […]

Wayan · 2 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.