currently I am randomly generating a set of number from 0 to 7 in decimal in array..then I hav to convert them in binary form... however,i fail to get it.. any mistake i did?hope to get
some advises from u ..

public class Initializationtest {

         public static void main(String[] args){

                  int[][] popsize = new int[20][19];
                           for(int i =0 ; i <popsize.length; i++){
                                  for(int j =0 ; j <popsize[i].length; j++){
                                   popsize[i][j] = (int)(Math.random()*8);




Hi seang85,
I don't want to do your homework but here is where going wrong .


There is a build in function to ease your work .Try to find it .