What does following method do( look at http://docs.oracle.com/javase/6/docs/api/ -> PreparedStatement -class)
setString(int parameterIndex, String x)
Sets the designated parameter to the given Java String value.
Does it mean that it assigns value of parameter to String - variable?
It's a prepared statement parameter. Look at the example at the top of the javadoc and you'll see little question marks in the sql. That method takes the value of the string variable and puts it in place of that question mark in the statement.
Howdy my friends! (My apologies, alvoutila.) I had to come back. Can't really talk politics on Facebook with family and coworkers. Or at least, I really shouldn't.