すいません、上記を実行すると下記のエラーが表示されます。
Connection refused. Check that the hostname and port is correct, and that the postmaster
is running with the -i flag, which enables TCP/IP networking.
at org.postgresql.Connection.openConnection(Connection.java:136)
at org.postgresql.Driver.connect(Driver.java:122)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at HelloWorldJDBCPostgreSQL.main(HelloWorldJDBCPostgreSQL.java:16)