class Solution { public int solution(String s) { int answer = 0; String[] str = s.split(""); if(str[0].equals("-")) answer = - Integer.parseInt(s.substring(1,s.length())); else answer = Integer.parseInt(s); return answer; } }