+ 3
Other way : Integer.valueOf() Accept both string, int and char in parameter and Return an Integer object https://www.geeksforgeeks.org/integer-valueof-vs-integer-parseint-with-examples/
29th Apr 2022, 6:25 AM
Roland
Roland - avatar
+ 4
If numeric string is integer then --------------------------------------- String s = "123"; int i = Integer.parseInt(s); System.out.println(i);//123
29th Apr 2022, 4:44 AM
Thineshan Panchalingam
Thineshan Panchalingam - avatar