JavaDeploy
SiteMap
Readers Writers
Java Streams
Java Programming
Java Language
Java Streams
«Prev
Next»
Java Streams
Stream Basics
Stream Input Definition
Roller Coaster Analogy
Input Streaming Data
System in-out
Additional Sources for I/O Streams
Java Stream Classes
I/O Stream Conclusion
Data Stream Reading
Reading Data from Streams
Efficient byte array Buffer
Counting available Bytes
Closing Stream Data
Writing Data Streams
Writing Data to Stream
Java Write Method
Java System.out
Java Write Byte
Java IO Flush
Java File Streams
Using Filestream
Character Mode DumpsFile
WritingData OutputStreams Conclusion
Filtering Streams
Chaining Streams
Marking Resetting Java Streams
Marking resetting Methods
Treating Arrays as Streams
Streaming Data between Threads
Writing Java Streams - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
What data type does the
write()
method return?
Please select the best answer.
A.
byte
B.
int
C.
long
D.
void
2.
When should you explicitly flush an output stream?
Please select the best answer.
A.
Whenever you need to make sure data is sent before you're through with the stream
B.
Never, because all output streams automatically flush whenever a new line in written
C.
Always
D.
Whenever you've used the output stream for a very short time
3.
The maximum number of bytes that can be written with one method call is:
Please select the best answer.
A.
32,767
B.
2,147,483,647
C.
2,147,483,648
D.
4,294,967,294
4.
What does the following line of code print?
System.out.write(65 + 256);
Please select the best answer.
A.
65
B.
321
C.
65256
D.
A
Your score is 0.0
Submit
Quiz Explanation