2011-12-08 4 views
0

나는 객체의 행렬을 가지고 있으며 그 원소의 원소를 얻고 싶다.행렬의 원소를 얻는다

Computer matrix[][]=new Computer[rows][cols] 

public Computer getComputerInTheMatrix(int n_rows,int n_cols){ 

return matrix[n_rows][n_cols]; 
} 

이 방법이 맞습니까?

+3

... –

답변

1

체감 OLI 시도했다 : 당신은`n_rows` 또는`n_cols`를 사용하지 않는

return matrix[n_rows][n_cols]; 
관련 문제