stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Intro Java - Review Flashcards | StudBud
Explore
/
Intro Java - Review
Intro Java - Review
37 terms
·
StudBud Administration
A #Java quiz to review basic object-oriented programming concepts with students.
Flashcards
37 cards
F
Practice quiz
P
Host live
L
Questions
37
Answers
1
To use a class in another package you need to __________________ it.
export
overload
rewrite
import
2
Collection of code - programmed & translated by someone else - ready for use in your programs
Class
Parameter
Method
Library
3
A reserved word used to declare and define constants is:
Final
Void
Static
Char
4
A value that cannot be changed by a program is called a:
static number
final
constant
magic number
5
In Java, every statement must end with this symbol.
!
.
;
}
6
What does an object store its data in?
instance variables
methods
access specifiers
files
7
Information that is given to the user by the program is called:
Cast
Input
Prompt
Output
8
What is the name of the constructor for the
BankAccount
class?
deposit
withdraw
balance
BankAccount
9
A data type that can contain any number of characters is called:
Digit
String
Char
Text
10
The _____ statement is used to implement a decision based on a condition or set of conditions
If
While
Do
GoTo
11
When comparing values in an if statement, what relational operator is used to mean not equal?
==
<>
!=
=!
12
What is the process of hiding object data and providing methods for data access called?
documentation
abstraction
encapsulation
instantiation
13
Encapsulation allows a programmer to use a class without having to know its________________.
implementation
methods
interface
name
14
Information provided to the program to make it run correctly:
Instance
Input
Override
Output
15
What term is used to refer to a sequence of characters enclosed in quotation marks?
Object
Comment
Variable
String
16
A single letter, symbol, or digit is called a
Character
Symbol
Cartoon
Type
17
Converting a value from one type to a different type is called:
Changing
Fishing
Basting
Casting
18
To place one string after another to create a new string; adding strings together:
Combine
Concatenate
Addition
Merge
19
In Java, the = sign means what?
meaning depends on where it's used
A value is equal to another value
A value is assigned to a variable or constant
it has no meaning in Java
20
A ____________ is a collection of classes with a related purpose.
package
method
collection
import
21
What is the output of the following Java statement?
4
64
6+4
10
22
Java has two Boolean operators that combine conditions; they are:
&&(and) and !!(or)
!& (or) and !!(and)
&& (or) and || (and)
&& (and) and || (or)
23
To increase or add to a value is to:
Inflate
Decrement
Increment
Deflate
24
Private instance variables _____________________
can only be accessed by methods of the same class
can only be accessed by methods of a different class
can only be accessed by the constructor of the class
cannot be accessed by methods of the same class
25
When a Java application starts, what is the name of the method that is executed?
Main
begin
main
start
26
Every Java program consists of one or more of these fundamental building blocks.
Applet
Class
CPU
Parameter
27
What is the length of the string "Java Program"?
12
14
11
none of these
28
What is the syntax for calling the println method on the object System.out?
Println(System.out, "any message");
System.out.println ("Any message");
Println("any message").system.out
System.out("Any message").println;
29
The name of the constructor is always the same as the name of the _______________________.
class
access specifier
parameter variable
instance variable
30
What is the return type of a constructor?
private
A constructor does not have a return type.
public
void
31
Error caused because the computer will only store a specific number of digits-no rounding.
Compile Error
Round Off Errors
Computation Error
Run-time Error
32
The Boolean data type has exactly two values. What are they?
beginning and ending
yes and no
either and or
false and true
33
You should declare all instance variables as _______________.
class
private
protected
public
34
By convention, classes begin with a(n)
Digit
Dollar sign
Lowercase letter
Uppercase letter
35
Parameters to methods are enclosed by these symbols.
//
{}
()
**
36
Each object of a class has its own set of ____________________.
constructors
instance variables
classes
methods
37
What is the name of the file declaring the class named MyClass?
myclass.java
MyClass.class
MyClass.java
MyClass