If you proceed as you've been doing you will go insane. I suggest a switch to PreparedStatement with JDBC post haste. Essentially it's used like this.
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","oracle");
PreparedStatement stmt=con.prepareStatement("insert into Emp values(?,?)");
stmt.setInt(1,101);
stmt.setString(2,"Test");
int i=stmt.executeUpdate();
System.out.println(i+" records inserted");
con.close();
Can also be used for selections, values returned to ResultSet instead of integer
...
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
String userid = rs.getString("USER_ID");
String username = rs.getString("USERNAME");
...
.executeQuery() used for selects, .executeUpdate() used for inserts.
Further reading:
http://www.ntu.edu.sg/home/ehchua/programming/java/jdbc_basic.html