I need to know did the update query go wrong or right, i know how to do it in PHP, but have no idea in java (I'm new to java).
It returns:
See the javadoc for more details: Execute Update Javadoc
And I strongly advise you to read the related section in JDBC Tutorial, read the section titled: Return Values for the executeUpdate Method