Which method is used to convert a String to an int in Java?
a) Integer.parseInt()
b) Integer.valueOf()
c) Double.parseDouble()
d) Double.valueOf()
Answer: a) Integer.parseInt()
Explanation: The Integer.parseInt() method is used to convert a String to an int in Java.