Deck 11: Introduction to Java
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
Deck 11: Introduction to Java
1
In Java, the relational and equality operators are used to compare the values stored in strings or other objects.
False
2
A static method, including method main, cannot call an instance method without first creating an object and applying the instance method to that object.
True
3
Static methods cannot call other static methods directly.
False
4
Java programmers usually use all uppercase letters for constant identifiers, with an underscore symbol between words.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
The primitive data types for Java represent numbers, characters, and Boolean values.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
Java uses type ____________________ to represent logical data.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
Statements beginning with the keyword ____________________ cause an exit from the method.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
In Java, all method arguments are call-____________________.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
The escape sequence that starts with \u represents a(n) ____________________ character.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
In Java, Strings are ____________________, that is, they cannot be modified.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
Java provides a class called ____________________ that stores character sequences and allows its contents to be changed.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
A(n) ____________________ is a constant value that appears directly in a statement.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
The ____________________ statements of a programming language determine the flow of execution through a program.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
A(n) ____________________ is a named description for a group of entities that have the same characteristics.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
A group of statements that is executed in sequence is written as a(n) ____________________ statement delimited by braces.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
The ____ is used to write a decision with conditions that select the alternative to be executed.
A) if ... else
B) switch
C) while
D) for
A) if ... else
B) switch
C) while
D) for
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
In Java and object-oriented programming, the ____ is the fundamental programming unit.
A) JVM
B) class
C) API
D) object
A) JVM
B) class
C) API
D) object
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
The ____ control structure is used to write a decision with scalar values that select the alternative to be executed.
A) if ... else
B) switch
C) while
D) for
A) if ... else
B) switch
C) while
D) for
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
You can use explicit cast operations to perform a(n) ____ and ensure that the assignment statement will be valid.
A) data type conversion
B) narrowing conversion
C) primitive type conversion
D) exception
A) data type conversion
B) narrowing conversion
C) primitive type conversion
D) exception
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
The ____ control structure is used to write a loop that specifies the repetition condition in the loop header.
A) if ... else
B) switch
C) while
D) case
A) if ... else
B) switch
C) while
D) case
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
Java provides a set of ____ classes whose objects contain primitive-type values.
A) boolean
B) instance
C) wrapper
D) char
A) boolean
B) instance
C) wrapper
D) char
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
____ are program errors that occur during the execution of a program.
A) Packages
B) Tokenizers
C) Streams
D) Exceptions
A) Packages
B) Tokenizers
C) Streams
D) Exceptions
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
Data fields are also called ____.
A) escape sequences
B) control structures
C) primitive data types
D) instance variables
A) escape sequences
B) control structures
C) primitive data types
D) instance variables
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
If you define one or more constructors for a class, you must also explicitly define the ____, or it will be undefined for that class.
A) visibility
B) no-parameter constructor
C) data type
D) escape sequence
A) visibility
B) no-parameter constructor
C) data type
D) escape sequence
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
A Java array has a length data field that can be used to determine the array's ____.
A) contents
B) size
C) data type
D) visibility
A) contents
B) size
C) data type
D) visibility
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck