CSE 2221 Midterm 1 Review Questions
with 100% Correct Answers
Algorithm Correct Answer: step-by-step description on how to solve a problem
Computer Program Correct Answer: tells a computer, in minute detail, the
sequence of steps that are needed to fulfill a task
RSS 2.0 Correct Answer: well-formed XML
<item> in RSS Correct Answer: must have <title> and <description> tag
label() method in XML Correct Answer: gives the name of the that element
Compile-time error Correct Answer: Occur due to inaccuracies in the code,
before the program has compiled
Run-time error Correct Answer: Syntactically correct, and the program runs, but
take an action the programmer didn't intend; sometimes lead to program
crashes
Classes Correct Answer: fundamental building blocks of java program
Methods Correct Answer: Part of classes, contain a sequence of instructions
public static void main (String [] args) Correct Answer: "Main" program where
most statements are executed
close() Correct Answer: method to close input/output stream; must always close
input/output stream
:
vPretest - Stuvia US
, 2
concatenated Correct Answer: joining two strings together
literals Correct Answer: values that literally appear in your program (like "true" for
a boolean variable)
variable Correct Answer: name of a "location" that stores a "value" of a
particular "type"
type Correct Answer: name of the set of all possible values a variable might
have
program variable Correct Answer: has a particular value during program
execution, but that value may change during any time
mathematical variable Correct Answer: has an arbitrary but fixed value
program type Correct Answer: has mathematical type that models it
Declaring a variable Correct Answer: must provide a name for its location to
store a value, and its program type
Initializing a variable Correct Answer: To initialize a variable, you assign it a value
Constant Correct Answer: value is initialized and never changed; have "final in
front of them (Ex. final int pi = 3.14;)
Operator Correct Answer: symbol(s) that is used with variables and values to
simplify how you write certain program expressions
Expression Correct Answer: syntactically well-formed and meaningful fragment
(Ex. keyBoardIn.nextLine()); analogous to a word in English
:
vPretest - Stuvia US