stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Java Programming Review Flashcards | StudBud
Explore
/
Java Programming Review
Java Programming Review
25 terms
·
StudBud Administration
·
12 plays
A #java programming quiz to review important concepts.
Flashcards
25 cards
F
Practice quiz
P
Host live
L
Questions
25
Answers
1
"Has a" is a term use to describe the relationship create by:
abstraction
implementation
aggregation
inheritance
2
In an if- else statement, if the boolean expression is false
nothing is executed
the if block is executed
all blocks are excuted
the else block is executed
3
An object of a class is known as:
instance
method
access specifier
member
4
Two or more methods with the same name and different signature:
overloading
abstraction
inheritance
overriding
5
If a loop does not contain within itself a way to terminate, it is called
do while loop
infinite loop
for loop
while loop
6
Classes are described by:
Variables and Functions
Header and Body
Public and Private
Fields and Methods
7
Which Scanner class method reads a String?
nextString
nextLine
getLine
chartAt
8
Symbolic names made up by the programmer that represents locations in RAM are:
compilation errors
variables
syntax
keywords
9
Assume: x = 5 and z = 20. The code then calculated z /= x. What is the final value of x?
5
4
0.25
20
10
If x = 10, what is its value after the loop? for (int y = 5; y < 20; y+= 5) { x += y; }
30
50
40
25
11
The process of protecting critital data inside of the object from code outside of the object:
Data Hiding
Inheritance
Defensive Programming
Public Specifying
12
The best type of loop to use when validating user input would be:
while loop
for loop
for each loop
do while loop
13
The superclass is: public class Avenger extends EndGame implements Movie
Thor
EndGame
Avenger
Movie
14
long[ ] array1 = new long[10]; Will have indexes that go up to the number:
0
9
10
11
15
An action that takes place within an Application such as clicking is known as:
incident
response
event
input
16
"Is a" is a term utilized to describe:
implementation
inheritance
abstraction
aggregation
17
Which of the following statements correctly creates a Scanner object for keyboard input?
Scanner keyboard = new Scanner(System.in);
Scanner keyboard(System.in);
Keyboard scanner = new Keyboard(System.in);
Scanner kbd = new Scanner(System.keyboard);
18
When the subclass contains a method signature that is the same as the superclass, is known as:
abstraction
overriding
overloading
inheritance
19
Which of the following expressions is equivalent to x <= y
! (x
x > y
! (x >= y)
! (x > y)
20
When a class is used as a "contract" and is implemented by another class, we call it a(n)
superclass
interface
abstract class
subclass
21
long[ ] array1 = new long[10]; Will create an array of ___ elements
11
9
10
0
22
HBox is an example of:
Control
Scene
Container
Stage
23
Runtime errors are usually the result of:
a syntax error
bad data
a compilation error
a logical error
24
A constructor has the purpose of:
Freeing Up Memory
Performing a mathematical operation and returning the result
Returning an object of the class
Perfoming initialization and setup
25
A ____ statement is used to test for equality against a list of values or cases.
for
case
switch
while