Design a class that has a static method namedwriteArray. The method should take two arguments: the name
Fantastic news! We've Found the answer you've been seeking!
Question:
Design a class that has a static method namedwriteArray. The method should take two arguments:
the name of a file and a reference to anintarray. The file should be opened as a binary
file, the contents of the array should be written to the file, and then the file should be closed.
design a second method in the class namedreadArray. The method should take two arguments:
the name of a file and a reference to anintarray. The file should be opened, data
should be read from the file and stored in the array, and then the file should be closed.
Demonstrate both methods in a program.
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date: