いくつか試してみました。double の配列を反復処理する必要があります。そして、各要素を最も近い整数に丸めます。私が間違っているアイデアはありますか?
for(int i = 0; i < example.length; i++){
Math.round(example[i]);
}
int[] example1 = new int[example.length];
for(int i=0; i<example1.length; i++) {
Math.round(example1[i]);
example1[i] = (int) example[i];
}