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