CS 1114 Lecture Notes - Lecture 7: Hard Coding, Substring, Instance Variable

27 views2 pages

Document Summary

Homework: none; however, note that labs are not in session this week due to fall break on f, 10/13. Upcoming assignments: begin lab vii due f, 10/13 at 17:00; observe program iii due w, 10/18 at 23:59. Notes: variables refer to the name for a location in memory. Fields, also called a data member, an attribute, or an instance variable is a type of variable. Fields store data throughout the life of an object and are accessible throughout the entire class. Local variables exist as long as a given method is being executed; one accessible within the method. Variables must be declared always provide an initial value, except for fields initialized in a constructor int measurement = 324; //data type, variable name, initial value measurement = 55; ***note: do not put the type name in front unless you are creating a variable declaration. The assignment operator refers to the = sign.

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