正在加载图片...
Array Basics r Suppose you need to handle up to 300 Student objects in a program for maintaining a high school alumni list, would you use 300 variables pose, you need to process daily temperatures for a month period in a science project, Would you use 65 variables rYou can, but would you? r An array is a collection of data values of the same data type If your program s to deal with 100 integers, 500 Account objects, real numbers, etc, you will use an array. C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 9-3© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 9 - 3 Array Basics Suppose you need to handle up to 300 Student objects in a program for maintaining a high school alumni list, would you use 300 variables? Suppose you need to process daily temperatures for a 12-month period in a science project, would you use 365 variables? You can, but would you? An array is a collection of data values of the same data type. If your program needs to deal with 100 integers, 500 Account objects, 365 real numbers, etc., you will use an array
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有