Q:

method for concatenating two different type arrays

this is my code, has no error while compile, but have run time error.
have exception ans do not show me output, where did i go wrong?
public static Object [] concatenate(int[]a ,double[] b) {
    int l=a.length;
    int  L = b.length;
    Object[]  ob=new Object[l+ L];
    for(int i=0;i<l;i++){
        ob[i] = a[i];
    }

i created the new object to add the two arrays into it.
    for(int j=0;j<L;j++){
        ob[j+l] = b[j];
    }

And used two for for printing them.
    System. out. print (ob);
    return ob;
}

A:

when you do this
System. out. print (ob);

you are actually printing the  hash code of the Array object, and not its content..
something like this can make more sense:
System.out.println(Arrays.toString(ob));

So I tried your code and works fine 
public static void main(String[] args) {
    int[] intArr = new int[5];
    for (int i = 0; i < intArr.length; i++) {
        intArr[i] = 0;
    }
    double[] doubleArr = new double[5];
    for (int i = 0; i < doubleArr.length; i++) {
        doubleArr[i] = 1.11;
    }
    int l = intArr.length;
    int L = doubleArr.length;
    Object[] ob = new Object[l + L];
    for (int i = 0; i < l; i++) {
        ob[i] = intArr[i];
    }
    for (int i = 0; i < L; i++) {
        ob[l + i] = doubleArr[i];
    }
    System.out.println(Arrays.toString(ob));
}

this prints

[0, 0, 0, 0, 0, 1.11, 1.11, 1.11, 1.11, 1.11]

