
CS402 T04
Authored by Mike Wong
Computers
Professional Development
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
1. What is the correct way to define a character in Java?
char c = "A";
char c = 'A';
char c = A;
char c = 'AB';
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
2. What will be the output of the following code?
char c = 65;
System.out.println(c);
A
65
Compilation Error
Null
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
3. What does System.out.println('\\'); print?
/
\
\\
Compilation Error
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
4. How do you find the length of a string str in Java?
str.size()
str.length
str.length()
str.len()
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
5. What happens if you try to access an index outside a string's length using charAt()?
Returns null
Returns '0'
Error, throws StringIndexOutOfBoundsException
Returns ' '
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
6. Which method converts a string to uppercase in Java?
str.toUpper()
str.upper()
str.toUpperCase()
toUpperCase(str)
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
7. What does Math.random() return?
A random int value
A random value between 1.0 and 10.0
A random double value greater than 1.0
A random value between 0.0 and smaller than 1.0
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
Python Basics
Quiz
•
Professional Development
17 questions
Redes de computadores
Quiz
•
Professional Development
20 questions
JavaScript
Quiz
•
Professional Development
16 questions
Examen Acces
Quiz
•
Professional Development
10 questions
FP2: 02 - STRINGS
Quiz
•
Professional Development
12 questions
Javascript Avanzado ft-22b Grupo 5
Quiz
•
Professional Development
11 questions
INFO-2EXAMEN
Quiz
•
University - Professi...
16 questions
Trắc nghiệm kiểu xâu
Quiz
•
Professional Development
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for Computers
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
100 questions
Screening Test Customer Service
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
10 questions
Reading a ruler in Inches
Quiz
•
4th Grade - Professio...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development