728x90 자바출력1 java - Double형 배열과 출력(toString(),for-each) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 import java.util.*; public class Assignment4_1 { public static void main(String[] args) { // TODO Auto-generated method stub double[] arr = {1.0, 2.0, 3.0, 4.0}; double total = 0.0; double max = 0.0; System.out.print("toString()으로 출력 : "); System.out.println(Arrays.toString(arr)); for (double value : arr) { System.out.print(value+" "); .. 2019. 10. 9. 이전 1 다음 728x90