Chapter 2 - Fundamental Data Types Flashcards
A number that cannot have a fractional part.
Integer
A symbol in a program that identifies a storage location that can hold different values.
Variable
A number that can have a fractional part.
Floating-point number
A constant value in a program that is explicitly written as a number, such as -2 or 6.02214115E23
Number literal
A word that has a special meaning in a programming language and therefore cannot be used as a name by the programmer.
Reserved word
To store a new value in a variable, replacing the previously stored value.
Assignment statement
Placing a new value into a variable.
Assignment
A value that cannot be changed by a program. In Java, constants are defined with the reserved word final.
Constant
An explanation to help the human reader understand a section of a program; ignored by the compiler.
Comment
A syntactical construct that is made up of constants, variables, method calls, and the operators combining them.
Expression
The % operator that computes the remainder of an integer division.
Modulus
Explicitly converting a value from one type to a different type. For example, the cast from a floating-point number x to an integer is expressed in Java by the cast notation (int) x.
Casts
A string that tells the user to provide input.
Prompt
A collection of related classes. The import statement is used to access one or more classes in a package.
Package
Information about each class in the Java library.
API documentation
A code library for building programs.
Application Programming Interface (API)
… letters, numbers, punctuation, spaces, and so on.
Characters
The word is a sequence of characters.
String
character sequences enclosed in quotes, such as “Harry”.
Literals
Placing one string after another to form a new string.
Concatenation
A character in text that is not taken literally but has a special meaning when combined with the character or characters that follow it. The \ character is an escape character in Java strings.
Escape character
A value of a class type.
Object
In Java, a number type, characters or boolean
Primitive type
A standard code that assigns code values consisting of two bytes to characters used in scripts around the world. Java stores all characters as their Unicode values.
Unicode