单项选择题

给PreparedStatement对象ps中SQL语句的第2个参数设置参数值为5时,正确的方法为()。

A.ps.setInteger(2,5)
B.ps.setInteger(1,5)
C.ps.setString(2,5)
D.ps.setDouble(2,5)