Quiz 2 - Programming Keywords

Quiz 2 - Programming Keywords

University

50 Qs

quiz-placeholder

Similar activities

UTS Pemrograman Mobile

UTS Pemrograman Mobile

University

50 Qs

SOAL PILIHAN GANDA MS. EXCEL 2026

SOAL PILIHAN GANDA MS. EXCEL 2026

University

50 Qs

UH INFORMATIKA BAB 2

UH INFORMATIKA BAB 2

10th Grade - University

50 Qs

Latihan USP Informatika IX paket 1

Latihan USP Informatika IX paket 1

9th Grade - University

50 Qs

Java қазақша 1 - 50

Java қазақша 1 - 50

University

50 Qs

Java қазақша 201 - 250

Java қазақша 201 - 250

University

50 Qs

UTS Digital Forensik

UTS Digital Forensik

University

50 Qs

Soal UTS Sistem Informasi Manajemen Pendidikan

Soal UTS Sistem Informasi Manajemen Pendidikan

University

50 Qs

Quiz 2 - Programming Keywords

Quiz 2 - Programming Keywords

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Irish Dajero

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Maria is writing her first Java program. She accidentally named her class file hello.java while her class inside the file is named Hello. What will likely happen when she compiles the program?

It will run without errors

It will produce a compile-time error

It will produce a runtime error

It will ignore the mismatch

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

A student declared the variable as: int 1stNumber = 10; What kind of error will this produce?

Compile-time error (invalid identifier)

Runtime error (division by zero)

Logical error (wrong calculation)

No error

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Carlo wants to store the price of a product with decimal places. Which declaration is most appropriate?

int price = 199.99;

float price = 199.99;

double price = 199.99d;

boolean price = true;

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

A programmer writes: System.out.print("Hello"); System.out.print("World"); What will be the output?

Hello World

HelloWorld

Hello World

Compile-time error

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

While coding, Ana used the word public as her variable name. What will happen?

It will work as expected

It will cause a compile-time error

It will run but give a warning

It will automatically convert public into a String

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

A program outputs true when comparing two values. Which data type is most likely used?

int

boolean

char

float

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

John wants to store the character Z. Which is the correct declaration?

char letter = "Z";

char letter = 'Z';

String letter = Z;

int letter = Z;

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?