Q: Unable to update a row using postgres implementing jersey Im using the following code to update an item in postgres
@POST
    @Path("update")
    @Consumes(MediaType.APPLICATION_JSON)
    public String updateSpecificItem( String msg) {
        String songString = "requesting";
        JSONObject jsonObj = new JSONObject(msg);
        ArrayList<Trending> output = new ArrayList<>();
        try {
            Connection connection = MyResource.getConnection();
            PreparedStatement stmt = connection
                    .prepareStatement("UPDATE TRENDING  SET TOPIC = ? , CATEGORY = ? , QUESTION = ? , ANSWER = ? =  , PROFILEPIC = ? , tick = now(), url = ? WHERE ID = ? ");
            stmt.setString(1, jsonObj.getString("topic"));
            stmt.setString(2, jsonObj.getString("category"));
            stmt.setString(3, jsonObj.getString("question"));
            stmt.setString(4, jsonObj.getString("answer"));
            stmt.setString(5, jsonObj.getString("profilepic"));
            stmt.setString(6, jsonObj.getString("url"));
            stmt.setInt(7, jsonObj.getInt("questionId"));
            stmt.executeUpdate();

            ResultSet rs = stmt.executeQuery();
            output = new ArrayList<Trending>();
            while (rs.next()){
                Trending trending = new Trending(rs.getInt("ID"),rs.getString("TOPIC"),rs.getString("CATEGORY"),rs.getString("QUESTION"),rs.getString("ANSWER"),rs.getString("PROFILEPIC"),rs.getTimestamp("tick"),rs.getString("url"));
                output.add(trending);
            }
            songString = "success";

        }catch(Exception ex){
             songString = "failure" + ex;
        }
        return songString.toString();
    }

Hence Im using the following query,

PreparedStatement stmt = connection
                          .prepareStatement("UPDATE TRENDING  SET TOPIC = ? , CATEGORY = ? , QUESTION = ? , ANSWER = ? =  , PROFILEPIC = ? , tick = now(), url = ? WHERE ID = ? ");

and It is firing the below error message..

ERROR: syntax error at or near ","   Position: 82

How can i be able to sort this out?
Following is the query being executed during run time,

UPDATE TRENDING  SET TOPIC = 'PaulBoiy' , CATEGORY = 'FIlter' ,
  QUESTION = 'what?' , ANSWER = 'yes' =  , PROFILEPIC = 'assa' , tick =
  now(), url = 'a' WHERE ID = '1'


A: It looks like you have a syntax error here:
ANSWER = ? = ,

Probably should be:
ANSWER = ? ,

