CS 1100 Lecture 4: August 26, 2016 Notes

10 views3 pages
26 Aug 2016
School
Course
Professor

Document Summary

A variable can hold multiple values at the same time. Instead of hard coding something, we would rather get input from the user. So that we can accept a number from the user while the program is running. Way we get input from the user is to use a scanner object. In this context, scanning is getting an input from the user, no actually scanning a paper or a page. A scanner is a class from the java library. To check something out from the java library, we have to import it. We must add a line above our class to be able to use a scanner. Import is a keyword to check out something from the library. This line tells where the scanner class is located. A package is a grouping of related classes in the java library. Once, scanner is imported, it must be set up before it"s used.

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