
Quiz 2 - Programming Keywords

Quiz
•
Information Technology (IT)
•
University
•
Hard
Irish Dajero
Used 5+ times
FREE Resource
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
Similar Resources on Wayground
50 questions
Operating System Quiz 2

Quiz
•
University
48 questions
Codean Java - Conditional

Quiz
•
University
50 questions
CC104 SUMMATIVE TEST

Quiz
•
University
50 questions
Quiz Kewirausahaan & Pemrograman Web

Quiz
•
11th Grade - University
55 questions
tech stack

Quiz
•
University
50 questions
300-350

Quiz
•
University
47 questions
Т.И. чотам 57-100

Quiz
•
University
50 questions
Quiz Komputasi dan Teknologi

Quiz
•
8th Grade - 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 Information Technology (IT)
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