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.

AWT / NOTES</>↗
AWT04 Feb 2008

How do I create key press event using Robot class?

In this example we use the java.awt.Robot class to generate a key press event. We can call the keyPress(int keyCode) method to produce this event. package org.kodejava.awt; import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; public class CreatingKeyboardEvent { public static void main(String[] args) { try { Robot robot = new Robot(); // Create a three seconds […]

Wayan · 1 min read
AWT / NOTES</>↗
AWT04 Feb 2008

How do I create a screen capture using Robot class?

In this example you’ll see how to create a screen capture / screenshot and save it as an image file such a PNG image. Some classes are use in this program including the java.awt.Robot, java.awt.image.BufferedImage and javax.imageio.ImageIO. package org.kodejava.awt; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.awt.AWTException; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Robot; import java.io.File; import java.io.IOE...

Wayan · 1 min read
CORE API / NOTES</>↗
Core API04 Feb 2008

How do I convert BigInteger into another radix number?

In this example you’ll see how we can convert a java.math.BigInteger number into another radix such as binary, octal and hexadecimal. package org.kodejava.math; import java.math.BigInteger; public class BigIntegerConversion { public static void main(String[] args) { BigInteger number = new BigInteger("2021"); System.out.println("Number = " + number); System.out.println("Binary = " + number.toString(2)); System.out.println("Octal = " + number.toString(8)); […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API31 Jan 2008

How do I do math operation for BigDecimal?

package org.kodejava.math; import java.math.BigDecimal; import java.math.RoundingMode; public class BigDecimalOperation { public static void main(String[] args) { BigDecimal decimalA = new BigDecimal("98765432123456789"); BigDecimal decimalB = new BigDecimal("10"); decimalA = decimalA.add(decimalB); System.out.println("decimalA = " + decimalA); decimalA = decimalA.multiply(decimalB); System.out.println("decimalA = " + decimalA); decimalA = decimalA.subtract(decimalB); System....

Wayan · 1 min read
CORE API / NOTES</>↗
Core API29 Jan 2008

How do I do math operation for BigInteger?

package org.kodejava.math; import java.math.BigInteger; public class BigIntegerOperation { public static void main(String[] args) { BigInteger numberA = new BigInteger("98765432123456789"); BigInteger numberB = BigInteger.TEN; numberA = numberA.add(numberB); System.out.println("numberA = " + numberA); numberA = numberA.multiply(numberB); System.out.println("numberA = " + numberA); numberA = numberA.subtract(numberB); System.out.println("numberA = " + numberA); numberA = numbe...

Wayan · 1 min read
CORE API / NOTES</>↗
Core API27 Jan 2008

How do I get the name of a class?

package org.kodejava.lang; import java.util.Calendar; import java.math.BigDecimal; public class ClassName { public static void main(String[] args) { // Get the name of the classes below. Class<?> clazz = String.class; System.out.println("Class Name: " + clazz.getName()); clazz = Calendar.class; System.out.println("Class Name: " + clazz.getName()); clazz = BigDecimal.class; System.out.println("Class Name: " + clazz.getName()); } } The result of the […]

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.