謎のプロジェクト

何だろうこれ…。
何をしたいのかがよく分からない…。
ビルド結果見ても分からない…。
でも直してみました。
その質問はこちら

修正前

class CountFills31a {
	public static void main(String args[]) {
		int c[][] = {
				{0,0,0,0,0,0,0,0,0,0},
				{0,1,1,1,1,1,1,1,1,0},
				{0,0,0,0,0,0,0,1,0,0},
				{0,0,1,1,1,1,0,1,0,0},
				{0,0,1,0,0,1,0,1,0,0},
				{0,0,1,1,1,1,0,1,0,0},
				{0,0,0,0,0,0,0,1,0,0},
				{0,0,0,0,0,0,1,1,0,0},
				{0,0,0,0,0,0,0,1,0,0},
				{0,0,0,0,0,0,0,0,0,0}
				};
		int i;
		int xZeroOneCount[][]=new int[10][10];
		int yZeroOneCount[][]=new int[10][10];
		int zeroOrOne;
		int x,y;
		for( y = 0; y < 10; y++) {
			x = 0;
			i = 0;
			zeroOrOne=1;
			while( i <10 ) {
                   xZeroOneCount[y][i]=0;
                   if( zeroOrOne= =0) {
                   zeroOrOne=1;
                   } else {
                   zeroOrOne=0;
                   }
                   while( x < 10 && c[y][x] == zeroOrOne ) {
					xZeroOneCount[y][i] = xZeroOneCount[y][i] + 1;
					x++;
				}
				i++;
			}
		}
		for( x = 0; x < 10; x++) {
			y = 0;
			i = 0;
			zeroOrOne=1;
			while( i <10 ) {
				yZeroOneCount[i][x] = 0;
				if( zeroOrOne == 0) {
					zeroOrOne = 1;
				} else {
					zeroOrOne = 0;
				}
				while( y < 10 && c[y][x] == zeroOrOne ) {
					yZeroOneCount[i][x] = yZeroOneCount[i][x] + 1;
					y++;
				}
				i++;
			}
		}
		for( y=0; y <10; y++ ) {
			for( x = 0; x < 10; x++ ) {
				System.out.print("" + c[y][x] + " ");
			}
			System.out.print(" || " + xZeroOneCount[y][0]);
			System.out.print("," +xZeroOneCount[y][1]);
			System.out.print("," +xZeroOneCount[y][2]);
			System.out.print("," +xZeroOneCount[y][3]);
			System.out.print("," +xZeroOneCount[y][4]);
			System.out.print("," +xZeroOneCount[y][5]);
			System.out.print("," +xZeroOneCount[y][6]);
			System.out.print("," +xZeroOneCount[y][7]);
			System.out.print("," +xZeroOneCount[y][8]);
			System.out.print("," +xZeroOneCount[y][9]);
			System.out.print("\n");
		}
		System.out.print("-------------------------\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[0][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[1][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[2][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[3][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[4][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[5][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[6][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[7][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[8][x]+"");
		}
		System.out.print("\n");
		for( x = 0; x < 10; x++ ) {
			System.out.print(" "+yZeroOneCount[9][x]+"");
		}
	}
}

修正後

public class Class17 {
	public static void main(String[] args){
		int c[][] = { {0,0,0,0,0,0,0,0,0,0},
		{0,1,1,1,1,1,1,1,1,0},
		{0,0,0,0,0,0,0,1,0,0},
		{0,0,1,1,1,1,0,1,0,0},
		{0,0,1,0,0,1,0,1,0,0},
		{0,0,1,1,1,1,0,1,0,0},
		{0,0,0,0,0,0,0,1,0,0},
		{0,0,0,0,0,0,1,1,0,0},
		{0,0,0,0,0,0,0,1,0,0},
		{0,0,0,0,0,0,0,0,0,0}
		};
		Data data = new Data();
		int xZeroOneCount[][] = new int[10][10];
		int yZeroOneCount[][] = new int[10][10];
		data.makeDataX(c, xZeroOneCount);
		data.makeDataY(c, yZeroOneCount);
		data.printConsole(c, xZeroOneCount, yZeroOneCount);
	}
}
class Data {
	public void makeDataX(int[][] c, int[][] xZeroOneCount){
		for(int y = 0; y < 10; y++) {
			int x = 0, temp = 1;
			for(int i = 0; i < 10; i++) {
				temp = (temp == 0 ? 1 : 0);
				xZeroOneCount[y][i] = 0;
				for(; x < 10 && c[y][x] == temp; x++){
					xZeroOneCount[y][i]++;
				}
			}
		}
	}
	public void makeDataY(int[][] c, int[][] yZeroOneCount){
		for(int x = 0; x < 10; x++) {
			int y = 0, temp = 1;
			for(int i = 0; i < 10; i++) {
				temp = (temp == 0 ? 1 : 0);
				yZeroOneCount[i][x] = 0;
				for(; y < 10 && c[y][x] == temp; y++){
					yZeroOneCount[i][x]++;
				}
			}
		}
	}
	public void printConsole(int[][] c, int[][] xZeroOneCount, int[][] yZeroOneCount){
		for(int y = 0; y < 10; y++ ) {
			for(int x = 0; x < 10; x++) {
				System.out.print("" + c[y][x] + " ");
			}
			for(int t = 0; t < 10; t++){
				System.out.print((t == 0 ? " || " : (xZeroOneCount[y][t] == 0 ? " " : ","))
						+ (xZeroOneCount[y][t] == 0 ? " " : xZeroOneCount[y][t]) + (t == 9 ? "\n" : ""));
			}
		}
		System.out.println("-------------------------");
		for(int t = 0; t < 10; t++){
			for(int x = 0; x < 10; x++ ) {
				System.out.print(" "+ (yZeroOneCount[t][x] == 0 ? " " : yZeroOneCount[t][x])
						+ (x == 9 && t != 9 ? "\n" : ""));
			}
		}
	}
}

そもそもメインクラスがpublic classじゃないことにもびっくりしたけどね。