3
parseInt 메서드를 사용하여 String의 처음 두 문자를 변환하려고하고 있지만 변환 할 수 없습니다. 다음과 같이하기로했다 : 예를 들어부분 문자열을 구문 분석 하시겠습니까?
String firstChars = IntMessage.substring(0,2);// firstChars is a String that corresponds to the first two characters of the string.
message=ASCII[(Integer.parseInt(firstChar))-32];//The message variable is a String that is supposed to take a firstChars variable and make it an integer so it can be used by the ASCII array in determining which element of the array is to be concatenated to the message String.
처음 두 문자는 내가 그 문자열을 가지고있는 int로 변환 할, 98있는 경우.
어떤 언어입니까? 그것을 태그하십시오. –
이것은 /해야/일하는 것 같습니다. 특정 컴파일러/런타임 오류가 발생합니까? – millimoose
"Can not"...를 정의하고 물론 문제를 나타내는 실제 코드를 게시하십시오. –