Java Streams   «Prev  Next»

Lesson 2 Java Streams Course Prerequisites
ObjectiveExplore what you need to know to succeed in this course.

Java Streams Course Prerequisites

Which prerequisites should one have before studying a course on Java Streams in Java 1.1?
Before embarking on a course that delves into Java Streams using Java 1.1, it is critical to ensure that you have a solid foundation in several key areas. The following prerequisites will equip you with the knowledge and skills needed to grasp the concepts effectively and get the most out of your learning journey.
  1. Fundamentals of Java: The most basic requirement is a strong understanding of Java fundamentals. This includes understanding Java syntax and structure, variables, data types, operators, control flow statements (loops, conditionals), and exception handling. Without this basic knowledge, understanding Java Streams would be a daunting task.
  2. Object-Oriented Programming (OOP) in Java: As Java is an object-oriented language, a thorough understanding of OOP concepts, such as classes, objects, inheritance, polymorphism, and encapsulation, is crucial. You should be comfortable with creating classes, using inheritance and interfaces, and understanding class relationships.
  3. Java Collections Framework: Prior to diving into Java Streams, it's essential to have a sound understanding of the Java Collections Framework, which includes interfaces like List, Set, and Map, and their respective implementations (ArrayList, HashSet, HashMap, etc.). Understanding collections is paramount as Java Streams operate primarily on collections.
  4. Working with Files and I/O in Java: Since streams are often used for input and output operations, especially when dealing with files, having experience with Java's I/O classes (like FileReader, FileWriter, BufferedReader, etc.) is beneficial. This includes understanding both byte streams and character streams.
  5. Threads and Concurrency: Java Streams leverage the power of parallel processing, which requires a fundamental understanding of threads and concurrency in Java. This includes knowledge of the java.lang.Thread class, the java.util.concurrent package, and concepts like synchronization and thread safety.
  6. Functional Programming in Java: A rudimentary understanding of Functional Programming (FP) concepts will be advantageous as Java Streams use many principles from FP. This includes concepts such as lambdas and functional interfaces, which were introduced in later versions of Java.
  7. Basic Software Development Skills: Familiarity with Integrated Development Environment (IDE) tools like Eclipse, IntelliJ IDEA, or NetBeans is recommended. Basic understanding of software version control systems like Git can also be beneficial.
  8. Java Development Kit (JDK) and Java Runtime Environment (JRE): Lastly, you should have Java Development Kit (JDK) installed on your computer, as well as understand how to use it to compile and run your Java programs. Familiarity with the Java Runtime Environment (JRE) is also important.

Please note that Java 1.1 is a considerably older version of Java (released in 1997), and many modern Java features like lambdas, functional interfaces, and the Stream API itself were introduced in later versions (Java 8 and onwards). If you're learning Java Streams specifically in the context of Java 1.1, it may be in a historical or academic context, or to maintain or interact with legacy systems. If you're starting to learn Java programming or looking to use Streams in contemporary development, I recommend using a more recent version of Java.


To successfully complete this course, you should be comfortable with :
  1. Know basic Java syntax including arrays, strings, and primitive data types
  2. Understand how Java deals with integer and byte data as well as with arrays of these data types
  3. classes, objects, and methods, particularly constructors and toString() methods
  4. Be able to write character-mode Java applications with main() methods

This course covers the Java platform classes used for basic I/O. It first focuses on I/O Streams, a powerful concept that greatly simplifies I/O operations. The course also looks at serialization, which lets a program write whole objects out to streams and read them back again. Then the course looks at file I/O and file system operations, including random access files. Most of the classes covered in the I/O Streams section are in the java.io package and most of the classes covered in the File I/O section are in the java.io.file package.

Java Network Programming

java.io.Console Quiz Question

Identify correct statements about java.io.Console class?
  1. You can read character data from a console but not write to it.
  2. You can read both binary and character data from Console object but you cannot write to it.
  3. You can read both binary and character data from Console object but you can only write character data to it.
  4. You can read as well as write only character data from/to it.

Answer: d
Explanation:
Console is meant to interact with the user typically through the command/shell window and keyboard. Thus, binary data does not make sense for the console. You can read whatever the user types using readLine() and readPassword() method. You can also acquire a Reader object using reader() method on Console object. All these provide character data. Similarly, you can acquire PrintWriter object using writer() method on Console, which allows you to write character data to the console.