How to persist data to PostgreSQL in Java

Java is perhaps the most widely used programming language nowdays. It’s robustness and platform-independent nature enables Java based applications to run on mostly anything. As is the case with any application, we need to store our data in some sort of reliable way – this need called databases to life.