为什么类Search中的Search1不能引用类FindLarge中的Find
1 public class FindLarge extends Tower{
2 int x,y,z,num;
3
4 public int Find(int b[][][],int c){
5 int a=0;
6 int d=0;
7 for (int x=0;x<=b.length-1;x++) {
8 if (b[x][c-1][0]==1) {
9 a = b[x][c-1][1];
10 break;11 }
12 }
13
14 for (int x=0;x<=b.length-1;x++) {
15 if ((b[x][c-1][0]==1) && (b[x][c-1][1]>= a )){
16 a = b[x][c-1][1];
17 d = x;
18 }
19 }
20 return d;
21 }
22
23 }
24
25 class Search extends FindLarge{
26 int large,position;
27
28 public void search1( int a,int b[][][]){
29 int c,d;
30
31 for (int x=0;x<=b.length-1;x++) {
32 if (b[a][x][0]==1) {
33 position = x;
34 break;
35 }
36 for (int y=0;y<=b.length-1;y++) {
37 if (b[a][y][0]==1) {
38 continue;
39 }
40 c =super.Find(b[a][y][1],(y+1));
41 }
42
43 }
44 }
45}