Hello people.
I have the following class.
public class Model{
private Kutia[][] c;
public Model(Kutia[][] x){
c = touch(x);
}
public void touch(Kutia[][] k){
for(int i = 0; i < 8; i++){
for(int j = 0; j < 8; j++){
if(k[i][j].occupied()){
touchHorizontal(k, i, j);
touchVertical(k, i, j);
}
}
}
}
public void touchHorizontal(Kutia[][] k, int i, int j){
for(int r = 0; r < 8; r++){
if(r != j){
k[r][j].increaseVlera();
}
}
}
public void touchVertical(Kutia[][] k, int i, int j){
for(int r = 0; r < 8; r++){
if(r != i){
k[i][r].increaseVlera();
}
}
}
public Kutia[][] modeled(){
return c;
}
}
Compiler is complaining for line six - incompatible types. I don't get it: how is a Kutia[][] object incompatible with another Kutia[][] object. please help.