JAVA DATE TIME API / CATATAN</>↗Java Date Time API18 Jul 2024
In the following code snippet we will see hot to change a date from one format to another format. For example from 2024-11-04 to 04-Nov-24 format in Java. We can use the DateTimeFormatter class from the java.time.format package to do the conversion. The steps are: Parse the original date string. Format it to the desired […]
JDBC / CATATAN</>↗JDBC15 Jul 2024
In this post, we will learn how to update records in a database using the Java Database Connectivity (JDBC) API. JDBC is a Java API which is used to connect and execute query in the database. We will be working with an MS Access database file named musicdb.accdb for this example. Our goal is to […]
JDBC / CATATAN</>↗JDBC15 Jul 2024
In this tutorial, we’ll guide you through the process of inserting records into an MS Access Database. In the code snippet below we are using the UCanAccess JDBC driver, you can find the Maven dependencies at the end of this tutorial. Setting Up The Connection Firstly, we need to set up a connection to our […]
JDBC / CATATAN</>↗JDBC15 Jul 2024
UCanAccess is a pure Java JDBC Driver implementation which allows Java developers and JDBC client programs to read and write Microsoft Access database files (.mdb and .accdb). In this tutorial, we will demonstrate how to configure a project with UCanAccess and create a simple Java application to select data from an MS Access database. Establishing […]
SPRING JDBC / CATATAN</>↗Spring JDBC24 Jun 2024
Spring JDBC simplifies database operations by providing an abstraction layer over traditional JDBC. In this blog post, we’ll walk through a practical example of using Spring JDBC to insert a record into a database and obtain the generated key for the newly inserted record. First, let’s look at the complete code snippet: package org.kodejava.spring.jdbc; import […]
IO / CATATAN</>↗IO13 Jun 2024
The following code snippet show you how to recursively rename files with a specific suffix. In this example we are renaming a collection of resource bundles files which ends with _in.properties into _id.properties. The code snippet also count the number of files affected by the process. We use the Files.move() method to rename the file, […]