public static void main(String args[]){
		MatrixOf0sAnd1s mos = new MatrixOf0sAnd1s();
		char matrix[][] = mos.create(4, 7);
		for(int i=0; i < matrix.length; i++){
			for(int j=0; j < matrix[i].length; j++){
				System.out.print(matrix[i][j] + " ");
			}
			System.out.println();
		}
	}
http://www.geeksforgeeks.org/create-a-matrix-with-alternating-rectangles-of-0-and-x/
Test case : negative or 0 for n or m
src/com/interview/multiarray/MatrixOf0sAnd1s.java