CS 1100 Lecture Notes - Lecture 6: Reserved Word, Dollar Sign

20 views7 pages
29 Aug 2016
School
Course
Professor

Document Summary

Section 2. 4, section 2. 5, section 2. 6, section 2. 7, and section 2. 8. Some words in java are chosen for us and we have to use them. Keywords / reserved words that are part of the language itself : public, class, static, int, double, etc. Names of things from the java library: println(), scanner, nextint(), etc. Other words, we get to choose ourselves: radius, number1, circlearea, etc. The words we get to choose ourselves are called identifiers. Variable names, class names, and some other things we"ll meet later on. There"s a few rules we have to follow when naming things. Rules for naming identifiers: only letters, digits, underscore (_), and dollar sign ( $) are allowed, cannot start with a digit, cannot be a reserved word, can be any length. Case sensitive means that capital and lower case letters are considered distinct. To java, all four of these identifiers are completely different: area, area, area, area.

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