Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

JDBC / CATATAN</>
JDBC03 Jun 2010

How do I check if the OUT parameter value is null?

This example show you how to use the CallableStatement.wasNull() method call to see if the last OUT parameter has a value of SQL NULL. package org.kodejava.jdbc; import java.math.BigDecimal; import java.sql.Connection; import java.sql.CallableStatement; import java.sql.DriverManager; import java.sql.Types; import java.sql.SQLException; public class WasNullExample { private static final String URL = "jdbc:mysql://localhost/kodejava"; private static final String USERNAME = […]

Wayan · 2 menit baca
BASIC / CATATAN</>
Basic02 Jun 2010

How do I convert double value into int value?

To convert double value into an int value we can use type casting or using the Double.intValue() method call. The code snippet below show you how to do it. package org.kodejava.basic; public class DoubleToInt { public static void main(String[] args) { Double numberA = 49.99; System.out.println("numberA = " + numberA); // Converting Double value to […]

Wayan · 1 menit baca
JDBC / CATATAN</>
JDBC30 Mei 2010

How do I call a stored procedure that return a result set?

This example show you how to call a stored procedure that return a result set of the query execution result. package org.kodejava.jdbc; import java.math.BigDecimal; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; public class CallableStatementExample { private static final String URL = "jdbc:mysql://localhost/kodejava"; private static final String USERNAME = "kodejava"; priv...

Wayan · 2 menit baca
JDBC / CATATAN</>
JDBC26 Mei 2010

How do I register out parameter in CallableStatement?

This example show you how to register out parameter for executing a stored procedure using the CallableStatement.registerOutParameter() method call. We must register the out parameters before the query execution. The registerOutParameter() method takes two parameters, the index of the parameter and the sql data type of the out parameter. package org.kodejava.jdbc; import java.sql.*; public class […]

Wayan · 2 menit baca
BASIC / CATATAN</>
Basic24 Mei 2010

How do I use the unary operators?

The unary operators requires only one operand to operate on, it can perform operations such as incrementing or decrementing value by one, negating a value or inverting a value of a boolean expression. The unary operators use the following symbols: Symbol Description + unary plus operator; indicates positive value – unary minus operator; negates a […]

Wayan · 2 menit baca
BASIC / CATATAN</>
Basic23 Mei 2010

How do I use the arithmetic operators?

The following example show you how to use Java arithmetic operators. The operators consist of the multiplicative operators (* for multiplication, / for division), % for remainder of division) and the additive operators (+ for addition,- for subtraction). You’ll also see we are using a combination of a simple assignment operator with the arithmetic operators […]

Wayan · 2 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.