Understanding How Java Works With Files

The Java java.io.File (File class for short) connects Java and the Operating System to read from and write to files. It can represent either a file or a directory. How files and directories are organized in the file system depends

How to connect Java to PostgreSQL using JDBC

This is a simple post that shows how to connect Java to PostgreSQL using JDBC. Although most Java developers do not use this technique anymore, frameworks still do, and the codes are abstracted away from us. Meanwhile, some may still

PostgreSQL – Create superusers If You Don’t Have Them

During the initial phase of our application development, we need superusers for our database, especially when we are starting with greenfield projects and no prior databases exist. Most of the time, we use this type of user to run DDL

Write Out XML Tags in Java using Lambda

Missed writing out an XML element end tag in your Java codes? You’re not alone. It is acceptable for small XML documents because spotting the erring codes is relatively easy. However, things may get very frustrating when writing huge XML

Run Java Codes Before Application Shutdown

This post shows how to run Java codes before an application shutdown. We can use this idea to clean up resources, notify remote systems or display a farewell message before the application completes its execution or terminates. Java Runtime Class

Spring – Multiple Names Or Aliases For A Bean

Sometimes we have use cases that require different codes to reference the same bean using other names or aliases. Fortunately, we can have one bean and give them multiple aliases in Spring. This post shows how to assign multiple names