NumberFormatException异常问题,求解释。 String msg=“INFO1:172.16.228.244:40.0:40.0”; StringTokenizer st=new StringTokenizer(msg,":"); //分解字符串 String keyword=st.nextToken(); String ipAddress=st.nextToken();//取得对方IP String x = st.nextToken(); String y = st.nextToken();
int m= (int)(Integer.parseInt(x)); int n=(int)(Integer.parseInt(y)); System.out.println(m); error指向这一行。 System.out.println(n); int px =m/3+1; int py = n/4+1;