Det enklaste sättet skulle vara
String query = "select LastModified from CacheTable where url = '" + url +"'";
Du bör dock använda bindningsvariabler:
String query = "select LastModified from CacheTable where url = ?";
prepStmt = conn.prepareStatement(query);
prepStmt.setString(1, url);
rs = prepStmt.executeQuery();