有没有办法使用多维数组作为 Java Beans 中的索引属性?我的意思是
public class BeanDemo implements java.io.Serializable {
private int[][] property;
public BeanDemo() {
}
public int[][] getProperty() {
return property;
}
public void setProperty(int[][] property) {
this.property = property;
}
public int getProperty(int i, int j) {
return property[j][i];
}
public void setProperty(int i, int j, int val) {
property[j][i] = val;
}
}