Java Exam UPDATED ACTUAL Exam Questions and CORRECT
Answers
input stream - a source of input data
output stream - the output data
nextInt() - method of scanner object reads in a string of digits and converts them into an int type,
scans through the input stream character by character, gathering characters into a group that can
be converted into numeric data
data type - a scheme for using bits to represent values; values are not just numbers, but any kind
of data that a computer can process; all values in a computer are represented using one data type
or another
primitive data - uses a small, fixed number of bytes, means a fundamental component that is used
to create other, larger parts
object - a big block of data, an object may use as many bytes of memory, usually consists of
many internal pieces
integer primitive type - have no fractional part
floating point - have a fractional part
short data type - uses 16 bits
long data type - uses 64 bits
, literal - when you can type the number just as you would on a typewriter
double - uses 64 bits, has great range and precision of ~15 sig fig decimal points
char type - represents a character using 16 bits (UNICODE)
control characters - bit patterns that show the end of a line or where to start pages
string - multiple characters, in quotes
boolean - used to represent single true/false value
variable - a named location in main memory which uses a particular data type to hold a value
declaration - where a program says that it needs a variable
syntax - the grammar of a programming language
assignment statement - changes the value that is held in a variable
expression - a combination of literals, operators, variable names, and parentheses to calculate a
value
operand - a value that is acted upon by an operator
new operator - asks for an object to be constructed
Answers
input stream - a source of input data
output stream - the output data
nextInt() - method of scanner object reads in a string of digits and converts them into an int type,
scans through the input stream character by character, gathering characters into a group that can
be converted into numeric data
data type - a scheme for using bits to represent values; values are not just numbers, but any kind
of data that a computer can process; all values in a computer are represented using one data type
or another
primitive data - uses a small, fixed number of bytes, means a fundamental component that is used
to create other, larger parts
object - a big block of data, an object may use as many bytes of memory, usually consists of
many internal pieces
integer primitive type - have no fractional part
floating point - have a fractional part
short data type - uses 16 bits
long data type - uses 64 bits
, literal - when you can type the number just as you would on a typewriter
double - uses 64 bits, has great range and precision of ~15 sig fig decimal points
char type - represents a character using 16 bits (UNICODE)
control characters - bit patterns that show the end of a line or where to start pages
string - multiple characters, in quotes
boolean - used to represent single true/false value
variable - a named location in main memory which uses a particular data type to hold a value
declaration - where a program says that it needs a variable
syntax - the grammar of a programming language
assignment statement - changes the value that is held in a variable
expression - a combination of literals, operators, variable names, and parentheses to calculate a
value
operand - a value that is acted upon by an operator
new operator - asks for an object to be constructed