MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Practice
Myprogramminglab 12.10 - 12.11 Quiz
«
Multiple Choice Questions
»
1
2
3
4
5
Write a statement that declares a PrintWriter reference variable named output and initializes it to a reference to a newly created PrintWriter object associated with a file named "output .txt". (Do not concern yourself with any possible exceptions here- assume they are handled elsewhere.)
0%
PrintWriter output=new PrintWriter(outfile);
0%
new PrintWriter(output)
0%
PrintWriter output = new PrintWriter("output.txt");
0%
PrintWriter output = new PrintWriter("textfile.txt");
Given an initialized String variable output, write an expression whose value is a reference to a newly created PrintWriter object associated with a file whose name is contained in output. (Do not concern yourself with any possible exceptions here-- assume they are handled elsewhere.)
0%
PrintWriter output = new PrintWriter("output.txt");
0%
PrintWriter output=new PrintWriter(outfile);
0%
String logfileName;
0%
new PrintWriter(output)
Declare a local variable output that is suitable for referring to an object that provides methods for writing to a text file.
0%
String logfileName;
0%
PrintWriter output = new PrintWriter("textfile.txt");
0%
PrintWriter output = new PrintWriter("output.txt");
0%
PrintWriter output=new PrintWriter(outfile);
Write an expression whose value is a reference to a newly created PrintWriter object associated with a file named "output .txt". (Do not concern yourself with any possible exceptions here- assume they are handled elsewhere.)
0%
new PrintWriter(output)
0%
new PrintWriter("output.txt")
0%
PrintWriter output=new PrintWriter(outfile);
0%
PrintWriter output = new PrintWriter("output.txt");
Declare a variable logfileName that is suitable for holding the name of a file.
0%
new PrintWriter(output)
0%
String logfileName;
0%
PrintWriter output = new PrintWriter("textfile.txt");
0%
myFile = new File ("input.dat");
0 h : 0 m : 1 s
«
Multiple Choice Questions
»
1
2
3
4
5
0
Answered
0
Not Answered
0
Not Visited
Correct : 0
Incorrect : 0
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page