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.

JDBC / NOTES</>↗
JDBC15 Jan 2026

How do I use CallableStatement for stored procedures?

Using a CallableStatement in JDBC is the standard way to execute stored procedures. It allows you to handle input parameters (IN), output parameters (OUT), and even result sets returned by the database. Here is a guide on how to use it for different scenarios. 1. Basic Syntax The syntax for calling a stored procedure uses […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC15 Jan 2026

How do I use PreparedStatement to prevent SQL injection?

Using PreparedStatement is one of the most effective ways to prevent SQL injection in Java. It works by separating the SQL query structure from the data, ensuring that user input is treated strictly as data and never as part of the executable SQL command. Here is how you use it: 1. The Key Concept: Placeholders […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC14 Jan 2026

How do I execute a simple SQL query with Statement?

Executing a simple SQL query using a Statement object in JDBC follows a straightforward pattern: establish a connection, create the statement, execute the query, and process the results. Here is a clean example of how to perform a SELECT query: Simple SQL Query Example package org.kodejava.jdbc; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC14 Jan 2026

How do I close JDBC resources properly?

Properly closing JDBC resources is crucial to prevent memory leaks and database connection exhaustion. In modern Java, the absolute best way to do this is by using the try-with-resources statement. The Best Practice: Try-with-Resources Introduced in Java 7, this approach automatically closes any resource that implements java.lang.AutoCloseable (which Connection, Statement, and ResultSet all do) at […]

Wayan · 3 min read
JNDI / NOTES</>↗
JNDI13 Jan 2026

How do I use DataSource instead of DriverManager?

Switching from DriverManager to DataSource is a best practice in modern Java applications because it supports connection pooling, is more configurable, and decouples your code from the specific database driver implementation. While DriverManager creates a physical connection every time you call getConnection(), a DataSource (specifically a pooling one) maintains a set of open connections that […]

Wayan · 3 min read
JDBC / NOTES</>↗
JDBC13 Jan 2026

How do I create a database connection with DriverManager?

Creating a database connection with DriverManager is the standard way to establish a session with a database in JDBC. 1. The Essential Formula To get a connection, you call DriverManager.getConnection() using a Connection URL, a username, and a password. Connection connection = DriverManager.getConnection(url, username, password); 2. Implementation Example In modern Java (JDBC 4.0+), you don’t […]

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.