hw10 - fle with the given name. or example (this is only an...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 302 Homework 10 - Due Monday, August 1 Name: 1. Write a method that given a flename, passed as a String parameter, returns a boolean that is true iF the fle exists and false otherwise. 2. Write a method named writeArray that takes two parameters: 1) a one-dimensional array oF type int and 2) a flename (stored as a String ), and writes each item oF the array to a
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fle with the given name. or example (this is only an example, your method should work For any parameter values), writeArray( { 2,5,6,7 } ,"output.txt") should write 2 5 6 7 to the fle output.txt. You do not need to check iF the fle already exists (just overwrite it), but remember to deal with IOException s....
View Full Document

Ask a homework question - tutors are online