COSC 236 Lecture Notes - Lecture 8: Boolean Expression, Semicolon

48 views4 pages

Document Summary

It is possible to read input from the console: the user types the input into the console, we can capture the input and use it in our program, such a program is called an interactive program. We print ouput using an object named system. out: this object has methods named println and print. Constructing a scanner object to read console input: scanner = new scanner(system. in); Nextint () reads integers from the keyboard. Each of these methods pauses your program until the user types input and presses. Enter: then the value typed is returned to your program. Prompt: a message printed to the user, telling them what input to type, before we read from the scanner. *can use methods after you create an object. *; //so that i can use scanner use this for any program asking for user input: must use this for this method use either.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions