Median Of An Array Java