Which of the following statements opens a file named MyFile.txt and allows you to read data from it?
a. Scanner inputFile = new Scanner("MyFile.txt");
b. File file = new File("MyFile.txt");
Scanner inputFile = new Scanner(file);
c. File Scanner = new File("MyFile.txt");
d. PrintWriter inputFile = new PrintWriter("MyFile.txt");
b. File file = new File("MyFile.txt");
Scanner inputFile = new Scanner(file);
You might also like to view...
Images are measured in points
Indicate whether the statement is true or false
32-bit programs are installed into which folder by default in a 64-bit edition of Windows?
A. C:\Program Files B. C:\Program Files (x32) C. C:\Program Files\Wins\Old D. C:\Program Files (x86)
____________________ is a low-level programming language that uses names and other symbols to replace some of the 0s and 1s in machine language.
Fill in the blank(s) with the appropriate word(s).
Which kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory?
A. SIGINT B. SIGKILL C. SIGQUIT D. SIGTERM