배열의 값 다운 캐스팅

Dec 19, 2023
배열의 값 다운 캐스팅
package ex03.exercise; public class Ex13 { public static void main(String[] args) { double[] arr = new double[3]; for (int i = 0; i < arr.length; i++) { arr[i] = 0; } System.out.println((int) arr[0]); System.out.println((int) arr[1]); System.out.println((int) arr[2]); } }
 
Share article

hyeonjeong-jang-0302