
OCA Exam Prep 1: Java Basic

Quiz
•
Computers
•
University
•
Hard
Ferdy Aditya
Used 9+ times
FREE Resource
23 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are valid Java identifiers? (Choose all that apply)
A$B
_helloWorld
True
java.lang
Public
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following program?
Line 6 generates a compiler error.
Line 7 generates a compiler error.
Empty = false, Brand =
Empty = false, Brand = null
Empty = null, Brand = null
3.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Which of the following are true? (Choose all that apply)
Line 5 generates a compiler error.
Line 7 generates a compiler error.
Line 9 generates a compiler error.
Line 8 generates a compiler error.
Line 6 generates a compiler error.
4.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Given the following class, which of the following is true? (Choose all that apply)
If String result = "done"; is inserted on line 2, the code will compile.
If String result = "done"; is inserted on line 6, the code will compile.
If String result = "done"; is inserted on line 4, the code will compile.
If String result = "done"; is inserted on line 9, the code will compile.
5.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Given the following classes, which of the following can independently replace INSERT IMPORTS HERE to make the code compile? (Choose all that apply)
import aquarium.*;
import aquarium.*.Jelly;
import aquarium.jellies.Jelly;
import aquarium.jellies.*;
import aquarium.jellies.Jelly.*;
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the following classes, what is the maximum number of imports that can be removed and have the code still compile?
0
1
2
3
4
7.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Given the following classes, which of the following snippets can be inserted in place of INSERT IMPORTS HERE and have the code compile? (Choose all that apply)
import aquarium.*;
import aquarium.Water;
import aquarium.jellies.*;
import aquarium.*;
import aquarium.jellies.Water;
import aquarium.*;
import aquarium.jellies.*;
import aquarium.Water;
import aquarium.jellies.Water;
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
JDBC

Quiz
•
University
19 questions
Data Types Java Concepts

Quiz
•
University
20 questions
Quiz on Java

Quiz
•
University
25 questions
Java - SET -1

Quiz
•
University
20 questions
Preguntas sobre JavaScript

Quiz
•
9th Grade - University
20 questions
ROUND 1

Quiz
•
University
20 questions
SASS and NPM Quiz

Quiz
•
University
20 questions
Artificial Intelligence

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University