Array summation Job
Development environment: Java
Tools: Eclipse
Two types of data Excel and CSV
I chose to open the CSV file with my classmates ' advice, which drew the first question of how to call the CSV file in Java. Here are the results of my Baidu
Http://www.educity.cn/java/627496.html
(Master in folk series)
The next step is the development of Java's source program (The Moment of Witness miracles).
First question: Given an array, the sum of the elements of the array is implemented, and the specific requirement is that all elements of a one-dimensional array (a[100]) be added.
The source program is as follows:
Experimental results:
displayed correctly. Yes, next.
Job two: Rewrite into a function (called arraysum), can realize any length array of all elements sum
SOURCE program:
Test data:
Validation results:
Well, one last question:
Job Three: Rewrite the Prog2 to be able to read data from a file, implement any length array, add elements within the specified range.
Test results:
Validation results:
Java Program Exercises