
CC104- PRELIM LAB EXAM
Authored by John Patrick Eleria
Information Technology (IT)
University
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
100 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Local variables are typically declared and initialized within which specific programming constructs?
Inside methods, constructors, or defined within specific blocks of code.
Outside any methods, constructors, or blocks, at the class level.
With a special 'static' keyword, existing as a single copy per class.
As primitive data types that store the actual values directly in memory.
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
When are instance variables initialized, holding values specific to an object's individual state?
When the program begins execution, before any objects are ever created.
Only once, when their containing class is first loaded into memory.
Upon the creation of an object using the 'new' keyword.
Immediately before any method within the class begins its execution.
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What keyword is required when declaring a variable within a class to make it a class variable?
private
public
final
static
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which primitive data type in Java is specifically designed for tracking simple true or false conditions?
char, capable of storing a single 16-bit Unicode character eRiciently.
byte, used to save space in large arrays, four times smaller than int.
boolean, representing a single bit of information for logical states.
short, another memory-saving type, two times smaller than an integer.
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which primitive data type consumes the smallest amount of memory, representing a single bit?
byte, typically using 1 byte to store integral values in an array.
boolean, which tracks true/false conditions and represents only one bit.
short, utilized for memory savings, being two times smaller than an int.
char, storing a single 16-bit Unicode character, taking 2 bytes.
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following options represents a reference type, storing memory addresses for data locations?
A variable declared as 'int' holding an integer numerical value.
A 'boolean' variable representing a simple true or false logical state.
An 'array' of integers, pointing to a memory location containing elements.
A 'char' variable containing a single 16-bit Unicode character value.
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which control structure allows testing a new condition when the preceding 'if' condition evaluates as false?
The 'switch' statement, which evaluates an expression against multiple cases.
The 'else if' statement, providing an alternative conditional block to execute.
A 'default' case, which executes if no other conditions are met previously.
The 'ternary operator', oRering a concise way to evaluate true/false outcomes.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University