Question
JAVA PROBLEM!!! Write a function named readfromFile() that take as input parameter a file name inFileName of type String and an array arr of type
JAVA PROBLEM!!! Write a function named readfromFile() that take as input parameter a file name "inFileName" of type String and an array "arr" of type Double. The function will then attempt to open the file "inFileName" for reading using try catch and read all the real double values from the file/ note that an integer is NOT a real double value. The double values will then be stored in the array "arr" in the order that they were read. (max 1000 values). The function finally returns a single integer indicating how many real double values were read. Use this header for your function : public static int readFromFrile(String infileName, double[] arr).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started