
Quiz 2 - Programming Keywords
Authored by Irish Dajero
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
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;
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
49 questions
КЖИ 50-100 модуль-1
Quiz
•
University
53 questions
Evaluación 1 - Fundamentos de Ingeniería de Software 5SC 25-1
Quiz
•
University
51 questions
Final Exam Review: Information Management
Quiz
•
University
46 questions
Software Engineering 2 Exam - Prelim
Quiz
•
University
46 questions
HỆ ĐIỀU HÀNH - BÀI 8
Quiz
•
University
50 questions
Business Process Managment Midterm
Quiz
•
University
51 questions
Java Arrays Worksheet
Quiz
•
University
50 questions
ETS ABD - UPN
Quiz
•
University
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University