Hi, guys,
I'm having trouble casting an int array into a double array. This is how I did it:
And it gave out this:Code:int[] a = {1, 2, 3, 4, 5}; double[] b = (double[])a;
Can anyone shed some light on this? Thanks.Code:test.java:7: inconvertible types found : int[] required: double[] double[] b = (double[])a; ^ 1 error


Reply With Quote


Bookmarks