
CS402 T04

Quiz
•
Computers
•
Professional Development
•
Hard
Mike Wong
Used 2+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
ITF+ Ch6, Software Development

Quiz
•
Professional Development
10 questions
Супер сложный тест

Quiz
•
Professional Development
13 questions
Recap dev web

Quiz
•
Professional Development
10 questions
Strings quiz

Quiz
•
Professional Development
19 questions
Javascript - Revisão

Quiz
•
University - Professi...
20 questions
Javascript Fundamental Practice

Quiz
•
Professional Development
11 questions
JavaScript

Quiz
•
Professional Development
10 questions
MGBTIK ALGORITMA PEMROGRAMAN

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Fun Random Trivia

Quiz
•
Professional Development
22 questions
Anne Bradstreet 1612-1672

Quiz
•
Professional Development
18 questions
Spanish Speaking Countries and Capitals

Quiz
•
KG - Professional Dev...
14 questions
Fall Trivia

Quiz
•
11th Grade - Professi...
15 questions
Disney Characters Quiz

Quiz
•
Professional Development
15 questions
Quiz to Highlight Q types & other great features in Wayground

Quiz
•
Professional Development