2 차원 문자열 배열이 있고 두 번째 열을 정수로 변환 한 다음 각 열을 숫자와 비교하고 싶지만 루프 내에서 수행하는 방법을 모르겠습니까?
int a=Integer.parseInt(array[0][1]);
int b=Integer.parseInt(array[1][1]);
int c=Integer.parseInt(array[2][1]);
int d=Integer.parseInt(array[3][1]);
int e=Integer.parseInt(array[4][1]);
int f=Integer.parseInt(array[5][1]);
int g=Integer.parseInt(array[6][1]);
int h=Integer.parseInt(array[7][1]);
int i=Integer.parseInt(array[8][1]);
int j=Integer.parseInt(array[9][1]);
if(number>a) return true;
if(number>b) return true;
if(number>c) return true;
if(number>d) return true;
if(number>e) return true;
if(number>f) return true;
if(number>g) return true;
if(number>h) return true;
if(number>i) return true;
if(number>j) return true;
String[][] array = new String[ROWSIZE][COLUMNSIZE]
for(int i = 0; i < ROWSIZE; i++){
if(number > Integer.parseInt(array[i][1])){
//do something
}
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다