Search posts...
class Solution { public int solution(String num_str) { int answer = 0; for(int i = 0 ; i < num_str.length(); i++) { String temp = ""; temp += num_str.charAt(i); answer += Integer.parseInt(temp); } return answer; } }