Question: Write two JAVA METHODS. The first will accept an array of ints passed from another method and create a txt file. Ints should be stored
Write two JAVA METHODS. The first will accept an array of ints passed from another method and create a txt file. Ints should be stored by line in the file, in the order they appeared in array. Last line of the file should contain total of all ints in the passed array. Output: problem1.txt The second method will read in a file passed from another method (I am using scanner do not reference bufferedreader). File will contain multiple lines each with a string or an int. If line value is int, add to running total. If string, subtract num of chars from running total. Output problem2.txt public void Problem1(int[] mySrtAr) { } public int Problem2(File file) { return total; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
