Top Posters
Since Sunday
w
5
a
3
j
2
a
2
t
2
u
2
r
2
j
2
j
2
l
2
d
2
y
2
New Topic  
Oughto Oughto
wrote...
Posts: 742
Rep: 1 0
7 years ago
What does the following code do?

Scanner keyboard = new Scanner(System.in);
String filename;
System.out.print("Enter the filename: ");
filename = keyboard.readString();
PrintWriter outFile = new PrintWriter(filename);

A) It establishes a connection with a file named filename.
B) It allows the user of the program to enter the file name of the file he/she wants to write to.
C) It writes to a file named filename.
D) Nothing, there is a syntax error.
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 249 times
3 Replies
Replies
Answer verified by a subject expert
ToothyToothy
wrote...
Top Poster
Posts: 744
Rep: 4 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Oughto Author
wrote...
7 years ago
makes a lot more sense, thanks for the help
wrote...
7 years ago
Good luck tackling the rest
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1561 People Browsing
 195 Signed Up Today
Related Images
  
 4118
  
 909
  
 353
Your Opinion
Which industry do you think artificial intelligence (AI) will impact the most?
Votes: 484

Previous poll results: Who's your favorite biologist?