Statement st=conn.createStatement();
String GPS = "kdlg";
Statement statement = null;
statement = conn.createStatement();
String SQL = "INSERT INTO gps_coordinat (class)" + (GPS );
System.out.println("УСПЕХ");
statement.executeUpdate(SQL);
String GPS = "kdlg";
String sql = "INSERT INTO gps_coordinat (class) VALUES (?)";
PreparedStatement preparedStatement = conn.prepareStatement(sql);
preparedStatement.setString(1, GPS);
int rows = preparedStatement.executeUpdate();
if(rows == 1) {
System.out.println("УСПЕХ");
} else {
System.out.println("что-то пошло не так...");
}