
Java String Quiz

Quiz
•
Computers
•
1st Grade - University
•
Medium
M. R.
Used 17+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the type of objects that can store a sequence of characters in Java?
Character
String
Array
Text
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used for both addition and concatenation in Java?
/
-
*
+
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a string using the new keyword in Java?
String str = new String[];
String str = String.new();
String str = new String("");
String str = new String();
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What escape character is used to insert a double quote in a string?
\"
\'
\\
\n
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of the following code:
String x = "50";
int y = 20;
String z = x + y;
50.20
50
5020
70
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which escape sequence represents a new line in Java?
\b
\r
\t
\n
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code:
String str = "Hello";
System.out.println(str.length());
5
4
Null
6
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
1-mavzu. Kotlin dasturlash tiliga kirish

Quiz
•
1st Grade
23 questions
Java Array

Quiz
•
University
20 questions
Array

Quiz
•
12th Grade
15 questions
Soal Java

Quiz
•
11th Grade - University
25 questions
Java Review

Quiz
•
9th Grade - University
20 questions
TGT APCSA

Quiz
•
11th Grade
18 questions
Підсумкове оцінювання № 1. Мова програмування Java

Quiz
•
7th Grade
17 questions
UFCD 789

Quiz
•
11th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
25 questions
Exploring POV and Unreliable Narrators

Quiz
•
7th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
30 questions
Computer Terminology Exercise #1 ( Fill Ins)

Quiz
•
9th Grade
15 questions
MLA Formatting

Quiz
•
9th Grade
20 questions
Typing Practice

Quiz
•
7th - 12th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
16 questions
4.2 Private & Personal Information

Lesson
•
4th Grade