正在加载图片...
Array Initialization r Like other data types, it is possible to declare and initialize an array at the same time. int[] number = 2,4,6,8 1 doub1e[] sampling Data={2.443,8.99,12.3,45.009,18.2, 9.00,3.123,22.084,18.08}; String[] monthName =("January,February ,"March 'April n,"May ll June I Jul August","September",October November December)i r The capacity of the array is set to the number of elements in the list number length samplingData length 9 monthName length 12 C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 9-9© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 9 - 9 Array Initialization Like other data types, it is possible to declare and initialize an array at the same time. int[] number = { 2, 4, 6, 8 }; double[] samplingData = { 2.443, 8.99, 12.3, 45.009, 18.2, 9.00, 3.123, 22.084, 18.08 }; String[] monthName = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; The capacity of the array is set to the number of elements in the list. number.length samplingData.length monthName.length 4 9 12
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有