Suppose a reference variable of type File called myFile has already been declared. Create an object of type File with the initial file name input.dat and assign it to the reference variable myFile.

LANGUAGE:  JAVA

CHALLENGE:

Suppose a reference variable of type File called myFile has already been declared. Create an object of type File with the initial file name input.dat and assign it to the reference variable myFile.

SOLUTION:


myFile = new File("input.dat");