CC104- PRELIM LAB EXAM
Quiz
•
Information Technology (IT)
•
University
•
Hard
John Patrick Eleria
Used 6+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
