Loading video...
Input, Output, & Errors
- The Scanner class provides a convenient way to get user input
- Use System.out.print and System.out.println to produce text output
- There are three escape sequences you need to know: (newline character), \” (double quote character), and \ (backslash character)
- Exceptions provide a way of gracefully dealing with unexpected conditions
- There are six types of exceptions you need to know about
Input, Output, & Errors
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
- Intro
- Roadmap
- Getting Input from the User
- For AP Questions, Will Look Like One of the Following
- One Method of Getting Input From the User
- Scanner Class
- Providing Output to the User
- Only 2 Included in AP Subset
- Example: Print Two Strings on the Same Line
- Example: Print a String and an Integer
- Example: Print a Blank Line
- Java Code Example
- Escape Sequences
- Backslash Character Followed by One or More Additional Characters
- Newline Character
- Double Quote Character
- Backslash Character
- Java Code Examples: Printing Escape Sequences
- Exception Handling
- Describe As
- Exceptions Within the AP Subset That Provides Structured Way to Handle Errors
- Java Code Example
- Summary

































0 answers
Post by Victor Niu on September 8, 2012
When I did the divide by 0 program, it finished successfully, and returned Infinity. Is this a new feature of Java?