Which of the following statements is correct to convert a String to be its corresponding integer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Which of the following statements is correct to convert a String to be its corresponding integer?

int num = Integer.parselnt("123.5"; int num = Integer.parselnt("123"); int num = Integer.parseDouble("123"); int num = Integer.parselnt("abc123");

12th Feb 2023, 12:15 AM
Amir Gadzhiev
1 Answer
+ 4
Are you trying to add quiz questions? Or do you not know the answer? If it's the first, you'll need to contact info@sololearn.com (I don't think they are accepting at the moment) The latter, you should post your answer, or try it in the code playground.
12th Feb 2023, 2:54 AM
Ausgrindtube
Ausgrindtube - avatar