stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Intro Java - Chapter 1 - 5 Review Flashcards | StudBud
Explore
/
Intro Java - Chapter 1 - 5 Review
Intro Java - Chapter 1 - 5 Review
60 terms
·
StudBud Administration
·
10 plays
A #Java quiz to review basic object-oriented programming concepts with students.
Flashcards
60 cards
F
Practice quiz
P
Host live
L
Questions
60
Answers
1
This testing method uses information about the structure of a program.
Code coverage
White-box testing
Boundary testing
Black-box testing
2
Which statement best describes a computer program?
decides what task it is to perform
sequence of instructions/decisions the computer carries out
a sequence of comments
a program can only perform one simple task
3
Information provided to the program to make it run correctly:
Input
Instance
Output
Override
4
The name of the constructor is always the same as the name of the _______________________.
access specifier
parameter variable
instance variable
class
5
What is the syntax for calling the println method on the object System.out?
System.out.println ("Any message");
Println(System.out, "any message");
Println("any message").system.out
System.out("Any message").println;
6
What is the output of the following Java statement?
4+6
10
4
46
7
What is the name of the file declaring the class named MyClass?
MyClass
MyClass.class
MyClass.java
myclass.java
8
Information that is given to the user by the program is called:
Input
Cast
Prompt
Output
9
When a decision statement is contained inside the branch of another decision statement:
the statements are parallel
the statements are sequential
the statements don't work
the statements are nested
10
What term is used to refer to a sequence of characters enclosed in quotation marks?
Comment
Object
Variable
String
11
Error caused because the computer will only store a specific number of digits-no rounding.
Run-time Error
Compile Error
Computation Error
Round Off Errors
12
A reserved word used to declare and define constants is:
Static
Char
Void
Final
13
Parameters to methods are enclosed by these symbols.
//
**
()
{}
14
By convention, classes begin with a(n)
Digit
Dollar sign
Lowercase letter
Uppercase letter
15
Converting a value from one type to a different type is called:
Basting
Changing
Fishing
Casting
16
Standard code assigned values consisting of two bytes to characters used in text around world:
Translation
Universal Code
Bytecode
Unicode
17
What is the name of the constructor for the
BankAccount
class?
balance
deposit
withdraw
BankAccount
18
A ____________ is a collection of classes with a related purpose.
import
package
method
collection
19
A string that tells the user what information to provide is called a:
Prompt
Poke
Output
Input
20
Each object of a class has its own set of ____________________.
instance variables
constructors
classes
methods
21
When comparing values in an if statement, what relational operator is used to mean not equal?
==
=!
!=
<>
22
A data type that can contain any number of characters is called:
Char
String
Digit
Text
23
@param denotes what type of variable?
parameter variable
instance variable
return variable
constant
24
Symbols that indicate a mathematical or logical operation
Expressions
Math
Constructors
Operators
25
Encapsulation allows a programmer to use a class without having to know its________________.
name
implementation
methods
interface
26
To increase or add to a value is to:
Inflate
Decrement
Increment
Deflate
27
A ____ contains sequences of instructions to perform a particular task.
Method
Label
Variable
Parameter
28
What statement is used to specify the value that a method gives back to its caller?
public
new
return
private
29
A testing method that does not take the structure of the implementation into account is called:
Boundary testing
Code Coverage
White-box testing
Black-box testing
30
What is the process of hiding object data and providing methods for data access called?
instantiation
abstraction
documentation
encapsulation
31
The Boolean data type has exactly two values. What are they?
either and or
false and true
yes and no
beginning and ending
32
What translates Java source code into files that contain instructions from the JVM?
Interpreter
Compiler
Assembler
Linker
33
Collection of code - programmed & translated by someone else - ready for use in your programs
Library
Method
Parameter
Class
34
What does an object store its data in?
instance variables
access specifiers
files
methods
35
A value that cannot be changed by a program is called a:
final
static number
constant
magic number
36
Every Java program consists of one or more of these fundamental building blocks.
CPU
Parameter
Applet
Class
37
What term is used to refer to text in a program that helps human readers understand the program
Comments
Constants
Statement
Methods
38
What is the return type of a constructor?
public
void
private
A constructor does not have a return type.
39
Setting a variable's initial value is called:
Initialization
Instance
Instantiation
Inferrence
40
To use a class in another package you need to __________________ it.
rewrite
overload
import
export
41
Making sure the user-supplied values are valid before using them in computations is called:
quality control
input validation
output validation
processing tests
42
What type of program can you use to enter your Java program?
Spreadsheet
Editor
Compiler
Database
43
In Java, every statement must end with this symbol.
!
;
.
}
44
Which statement best describes the portability characteristic of Java?
same Java class files run on different OSs without change
Easy to compile Java source code one different OSs
easy to copy Java source code from one machine to another
Easy to change a program so it'll work on different OSs
45
What does CPU stand for?
Central Processing Unit
Computer Programming Unit
Central Programming Unit
Computer Processing unit
46
Information about each class in the Java library is found in the:
API Documentation
Code Hints
Appendix
JPI Documentation
47
You should declare all instance variables as _______________.
private
public
protected
class
48
Private instance variables _____________________
cannot be accessed by methods of the same class
can only be accessed by the constructor of the class
can only be accessed by methods of the same class
can only be accessed by methods of a different class
49
The rule that defines which operator is evaluated first is called:
Murphy's Law
Rule of Law
Order of Operations
Robert's Rules of Order
50
Which terminology describes a method that modifies the internal data of its implicit parameter?
void
public
accessor
mutator
51
To place one string after another to create a new string; adding strings together:
Addition
Combine
Merge
Concatenate
52
The _____ statement is used to implement a decision based on a condition or set of conditions
While
If
Do
GoTo
53
When a Java application starts, what is the name of the method that is executed?
begin
Main
main
start
54
What is the term used to refer to Java code that runs in a browser?
Class
Script
Html
Applet
55
In Java, the = sign means what?
it has no meaning in Java
A value is assigned to a variable or constant
A value is equal to another value
meaning depends on where it's used
56
Java has two Boolean operators that combine conditions; they are:
&&(and) and !!(or)
&& (and) and || (or)
&& (or) and || (and)
!& (or) and !!(and)
57
The output of a method is called its ________________ value.
Implicit
Explicit
Parameter
Return
58
To get a printout of the program flow, you can insert __ into the program (println for example)
quoted statements
console output
logging messages
trace messages
59
A single letter, symbol, or digit is called a
Symbol
Cartoon
Type
Character
60
What is the length of the string "Java Program"?
14
11
none of these
12