I have this piece of example code:
public Post findById(Long id) {
String sql = "select id, title, text from post where id = ?";
return template.queryForObject(sql, new Object[] {id}, getPostRowMapper());
}
I don't understand what the new Object[] {id}
is doing here