자료구조 (1) 썸네일형 리스트형 [Java] 자료구조 (Data Structures) 1. Array Syntax // Declaring and Creating Arrays int[] nums = new int[3]; double[] dubs = {1.0, 2.0, 3.0, 4.0, 5.0}; String[] str = {"Hello", , "world!"}; int[][] arr = new int[2][5]; // length of array int ln = nums.length; Example // foreach loops public class TestArray { public static void main(String[] args) { double[] arrList = {2.0, 3.3, 5.5, 7.1}; // Print all the array elements for (doub.. 이전 1 다음