CC104- PRELIM LAB EXAM

CC104- PRELIM LAB EXAM

University

100 Qs

quiz-placeholder

Similar activities

AI and Machine Learning Quiz

AI and Machine Learning Quiz

University

97 Qs

Câu hỏi về Microsoft Word 2010

Câu hỏi về Microsoft Word 2010

University

98 Qs

INF-99-C

INF-99-C

University

99 Qs

Bihar - méthodes agiles

Bihar - méthodes agiles

University

100 Qs

Quiz về MS-Excel

Quiz về MS-Excel

University

100 Qs

Ujian Khusus Susulan - MK Keamanan Komputer

Ujian Khusus Susulan - MK Keamanan Komputer

University

104 Qs

Вопросы по операционным системам

Вопросы по операционным системам

University

99 Qs

АКТ Сессия

АКТ Сессия

University

100 Qs

CC104- PRELIM LAB EXAM

CC104- PRELIM LAB EXAM

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?