ITEC 1620 Lecture Notes - Lecture 2: Data Conversion, String Literal
Document Summary
A string literal is represented by putting double quotes around the text. Every string in java an object defined by a string class. The + operator is also used for arithmetic addition. A variable is a name for a location in memory that holds a value. A variable can be given an initial value. When a variable is referenced to in a program, its current value is used. A variable must be declared by specifying the variable"s name and the type of info that it will hold. A variable can be given an initial value in the declaration. An assignment statement changes the value of a variable. The assignment operator is the = sign. A constant is an identifier that is similar to a variable except that it holds the same value during its entire existence. As the name implies, it is constant, not variable.