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