IAT 167 Study Guide - Final Guide: Local Variable, Global Variable, Class Variable

43 views9 pages

Document Summary

Variable - storage location with an associated symbolic name that holds value; has a data type associated with it, determines size of storage location. Primitive types: int, float, byte, char, boolean. String - class that has many operators and methods to manipulate strings. Type casting - conversion of data type from one into another two types: implicit (system"s job) and explicit (programmer"s job) When a data type that"s lower in size is assigned to a data type of higher size, Processing will implicitly cast its type float xspeed = 2; is fine, it"s implicitly converted to float xspeed = 2. 0; Local variables - variables declared within a method, scope is the method body (doesn"t exist outside the method) Fields (member variables) - variables declared within a class, but outside any of its method scope is the class body if private . Class and its subclasses if public / protected .