SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

SPRING JDBC / NOTES</>↗
Spring JDBC22 Jul 2010

How do I select records from database using JdbcTemplate?

In this example you will learn how to select records from the database using JdbcTemplate.queryForList() method. This method returns a List object which stores information selected from the table in a HashMap object. The key of the map is the table’s field names while the value of the map contains the corresponding table’s field value. […]

Wayan · 2 min read
SPRING JDBC / NOTES</>↗
Spring JDBC19 Jul 2010

How do I delete records from database using JdbcTemplate?

The code below demonstrates on how to delete some records from database using the JdbcTemplate. package org.kodejava.spring.jdbc; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DriverManagerDataSource; import javax.sql.DataSource; public class DeleteDemo { public static final String DRIVER = "com.mysql.cj.jdbc.Driver"; public static final String URL = "jdbc:mysql://localhost/musicdb"; public static final String USERNAME = "root";...

Wayan · 2 min read
SPRING JDBC / NOTES</>↗
Spring JDBC17 Jul 2010

How do I update records in the database using JdbcTemplate?

The example demonstrated below will show you how to use the JdbcTemplate.update() method for updating records in database. This method returns an integer value indicating number of records updated in the database when the query is executed. package org.kodejava.spring.jdbc; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DriverManagerDataSource; import javax.sql.DataSource; import java.sql.Types; import java.util.Date; public clas...

Wayan · 2 min read
CORE API / NOTES</>↗
Core API13 Jul 2010

How do I use the SortedMap interface?

package org.kodejava.util; import java.util.*; public class SortedMapDemo { public static void main(String[] args) { SortedMap<String, String> sorted = new TreeMap<>(); sorted.put("United States", "New York"); sorted.put("United Kingdom", "London"); sorted.put("Netherlands", "Amsterdam"); sorted.put("Japan", "Tokyo"); sorted.put("France", "Paris"); // Gets the first(lowest) key currently in this map String firstKey = sorted.firstKey(); // Gets the last (highest) key currently...

Wayan · 2 min read
CORE API / NOTES</>↗
Core API10 Jul 2010

How do I convert a java.util.Vector into an array?

This example demonstrates how to convert a Vector object into an array. You can use the Vector.copyInto(Object[] array) method to create a copy of the Vector object in array form. package org.kodejava.util; import java.util.Vector; public class VectorToArray { public static void main(String[] args) { Vector<Integer> vector = new Vector<>(); vector.add(10); vector.add(20); vector.add(30); vector.add(40); vector.add(50); // […]

Wayan · 1 min read
BASIC / NOTES</>↗
Basic06 Jul 2010

How do I use the shift right “>>” operator?

The signed shift right operator >> shifts a bit pattern to the right. This operator operates with two operand, the left-hand operand to be shifted and the right-hand operand tells how much position to shift. Shifting a 1000 bit pattern using the >> operator 2 position will produce a 0010 bit pattern. The signed shift […]

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.