Learn
You’ve made it to the end! Let’s review what we have learned so far:
- Printing output in a Java program can be done using the following three commands:
System.out.print()
,System.out.println()
, andSystem.out.printf()
- The
Scanner
class is built into Java and is useful for reading input from different sources including user input, and text files. FileWriter
is used to output data from a program into a file on your computer, andFileReader
is used to read from a file. They both are specifically tailored to reading and writing character/text data to files.IOExceptions
are exceptions related to input or output that a program may encounter. They can be handled by a programmer using try-catch blocks.- Java programs must initially be compiled into Java byte code before they can be run using a terminal or command prompt. When running a Java program, a user can pass in multiple arguments through the command line.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.