Answer:
The correct answer for the given question is ps.setString(1, "John");.
Step-by-step explanation:
Prepared statement are used in java programming language.Prepared statement are the interface they increases the performance i.e query run faster.
According to the question we have to assign the value of first parameter i.e "fName" as "fname" is a string that means we have to set a string parameter so following query will be used ps.setString(1, "John");.This statement specify the first parameter in the query.The setString() method set the string along with the position and the value of string.If we have to set integer parameter then we have to use "setInt()" along with position and the value.