Which of the following statements will convert a string s into i of int type?

Which of the following statements will convert a string s into i of int type?


A. i = Integer.parseInt(s);
B. i = (new Integer(s)).intValue();
C. i = Integer.valueOf(s).intValue();
D. i = Integer.valueOf(s);
E. i = (int)(Double.parseDouble(s));

The correct answer is ABCE


Java

Learn More Multiple Choice Question :