- Home
- MCQs by exam
- OCA Java
- Computer Science MCQs
OCA Java MCQs – Computer Science MCQs
10 multiple choice questions typical of the OCA Java exam, with answers and explanations. Switch on practice mode to test yourself first.
-
A
"Hi"
Correct answer
-
B
"!"
-
C
"Hi!"
-
D
null
-
A
Iterable
-
B
AutoCloseable
Correct answer
-
C
Runnable
-
D
Serializable
-
A
16 bits
Correct answer
-
B
32 bits
-
C
4 bits
-
D
8 bits
-
A
Method overloading
-
B
Method overriding
Correct answer
-
C
Abstraction
-
D
Encapsulation
-
A
private static void main(String[] args)
-
B
public void main(String[] args)
-
C
public static void main(String[] args)
Correct answer
-
D
public static int main(String[] args)
-
A
Unchecked exceptions such as NullPointerException
-
B
Checked exceptions such as IOException
Correct answer
-
C
Errors such as OutOfMemoryError
-
D
Runtime exceptions such as ArithmeticException
-
A
Vector
-
B
ArrayList
-
C
HashSet
Correct answer
-
D
LinkedList
-
A
false
Correct answer
-
B
true
-
C
A runtime exception
-
D
A compile-time error
-
A
volatile
-
B
transient
-
C
abstract
-
D
final
Correct answer
-
A
null
-
B
−1
-
C
1
-
D
0
Correct answer