
CS402 T02b
Authored by Mike Wong
Computers
Professional Development
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
1. What would happen if you attempt to store a value of 1000 in a byte variable?
It will store successfully.
A compilation error occurs.
A runtime error occurs.
It will store the value as 127.
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
2. What is the correct way to represent a floating-point literal in Java?
100.5L
100
100.5f
100.5
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
3. What is the default type for a floating-point literal in Java?
float
double
long
byte
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
4. Which of the following is true about implicit casting in Java?
It converts a double to int.
It automatically widens a smaller type to a larger type.
It truncates decimal places.
It only works for int and byte types.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
5. Which operator is used for incrementing a variable by 1 in Java?
++
--
+=
==
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
6. What is the output of the following code?
int i = (int) 3.9;
System.out.println(i);
4
3.9
3
Compilation error
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
7. What will be the output of the following code?
int x = 10;
System.out.println(++x + x++);
11
20
21
22
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
10 questions
ABC
Quiz
•
Professional Development
14 questions
Day 1 - Basics of Java
Quiz
•
Professional Development
10 questions
दशलक्षण धर्म - सत्य धर्म
Quiz
•
KG - Professional Dev...
14 questions
Web Basic
Quiz
•
Professional Development
13 questions
SCORE
Quiz
•
Professional Development
10 questions
Quiz - Simulado Comentado CLF-C02 - 29/11/2023
Quiz
•
Professional Development
11 questions
L7 - Bài 14 TT Tuần tự
Quiz
•
Professional Development
10 questions
AWS Practitioner - 10
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
12 questions
Unit 5: Puerto Rico W1
Quiz
•
Professional Development
42 questions
LOTE_SPN2 5WEEK2 Day 4 We They Actividad 3
Quiz
•
Professional Development
15 questions
Balance Equations Hangers
Quiz
•
Professional Development
31 questions
Servsafe Food Manager Practice Test 2021- Part 1
Quiz
•
9th Grade - Professio...