@@ -0,0 +1,915 @@
+package iot.pi.queue.util;%0A%0Aimport java.sql.DriverManager;%0Aimport java.sql.Connection;%0Aimport java.sql.SQLException;%0A%0Apublic class DBUtil %7B%0A%0A%09public static void main(String%5B%5D argv) %7B%0A%09%09try %7B%0A%09%09%09Class.forName(%22org.postgresql.Driver%22);%0A%09%09%7D catch (ClassNotFoundException e) %7B%0A%09%09%09System.out.println(%22Where is your PostgreSQL JDBC Driver? Include in your library path!%22);%0A%09%09%09e.printStackTrace();%0A%09%09%09return;%0A%09%09%7D%0A%09%09System.out.println(%22PostgreSQL JDBC Driver Registered!%22);%0A%09%09Connection connection = null;%0A%09%09try %7B%0A%09%09%09connection = DriverManager.getConnection(%22jdbc:postgresql://127.0.0.1:5432/iot%22, %22max%22, %22isaac34%22);%0A%09%09%7D catch (SQLException e) %7B%0A%09%09%09System.out.println(%22Connection Failed! Check output console%22);%0A%09%09%09e.printStackTrace();%0A%09%09%09return;%0A%09%09%7D%0A%09%09if (connection != null) %7B%0A%09%09%09System.out.println(%22You made it, take control your database now!%22);%0A%09%09%7D else %7B%0A%09%09%09System.out.println(%22Failed to make connection!%22);%0A%09%09%7D%0A%09%7D%0A%0A%7D

add db class