
Unit 5

Quiz
•
Computers
•
University
•
Medium
Mr. V
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Java, which class is used to represent a sequence of characters?
CharArray
StringArray
String
CharSequence
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Strings in Java are:
Mutable
Immutable
Both mutable and immutable
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when you concatenate two strings using the "+" operator in Java?
The original strings are modified
A new string object is created with the concatenated value
The "+" operator cannot be used with strings
An exception is thrown
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to compare two strings for equality in Java?
compare()
equals()
isEqual()
compareTo()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code?
String str1 = "Hello";
String str2 = "hello";
System.out.println(str1.equals(str2));
true
false
The code will not compile
An exception will be thrown
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The method length() in the String class returns:
The number of characters in the string
The number of words in the string
The size of the string in bytes
The capacity of the string
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to convert all characters in a string to lowercase?
toLowerCase()
convertToLower()
changeCase()
lowerCase()
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
java básico y pilas

Quiz
•
University
12 questions
Java

Quiz
•
University
15 questions
OOP Semifinal Quiz IS2C

Quiz
•
University
10 questions
OOP VB.Net 1

Quiz
•
University
10 questions
java script

Quiz
•
University
10 questions
G12_Week7

Quiz
•
12th Grade - University
15 questions
Python Basics

Quiz
•
University
10 questions
Variable warm-up activity

Quiz
•
6th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University