21.1.1 - Streams in Java
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What type of stream is best suited for reading binary data?
💡 Hint: Think of raw data.
Name a class used for writing character data.
💡 Hint: It starts with 'F'.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
Which class is used to read bytes from a file?
💡 Hint: Focus on the class that deals with bytes.
True or False: Character streams are better suited for binary data.
💡 Hint: Think about the types of data.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Create a small program that reads a file using BufferedInputStream, counts how many bytes are read, and displays the count.
💡 Hint: Focus on looping through the byte stream to count instead of reading into an array.
Write a method that takes a filename as input, uses PrintWriter to append a line of text to the file, and handles exceptions.
💡 Hint: Make sure to open the FileWriter in append mode.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.