
Strings quiz
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Hard
Ms STAFF
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
String s1 = "hello";
String s2 = "hel" + "lo";
System.out.println(s1 == s2);
true
false
compile time error
runtime error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following return?
String s1 = "hello";
String s2 = "hel";
String s3 = s2 + "lo";
System.out.println(s1 == s3);
true
false
compile time error
runtime error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
String s = "Java";
s.concat("World");
System.out.println(s);
JavaWorld
Java
World
Compiler error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the code?
String str1 = new String("Test");
String str2 = str1.intern();
System.out.println(str1 == str2);
true
false
compiler error
runtime error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method removes whitespace from both ends of a string?
removeWhiteSpace()
strip()
trim()
deleteSpace()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does String.valueOf(123) return?
123 as int
123.0
"123"
Compilation error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this print?
String s = " ";
System.out.println(s.isBlank());
true
false
compiler error
exception
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
A+ Core 1 Printer Troubleshooting
Quiz
•
University - Professi...
7 questions
Review Class 11
Quiz
•
Professional Development
10 questions
Python Basics
Quiz
•
Professional Development
10 questions
PDS - 04225 Pointers & Dynamic Arrays - Chapter 8
Quiz
•
University - Professi...
10 questions
CompTIA Security+ 11-20
Quiz
•
Professional Development
10 questions
FP2: 02 - STRINGS
Quiz
•
Professional Development
15 questions
MASS STORAGE QUESTIONS
Quiz
•
9th Grade - Professio...
12 questions
Javascript Avanzado ft-22b Grupo 5
Quiz
•
Professional Development
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
25 questions
Christmas Movies
Quiz
•
Professional Development
20 questions
Christmas Trivia
Quiz
•
Professional Development
15 questions
Fun Holiday Trivia
Quiz
•
Professional Development
25 questions
Name That Tune - Christmas
Quiz
•
Professional Development
29 questions
Christmas Song Emoji Pictionary
Quiz
•
Professional Development
9 questions
Holiday Movie Trivia
Lesson
•
Professional Development
34 questions
Winter Trivia
Quiz
•
Professional Development
