
Java Programming Quiz in String
Authored by Niveditha N
Other
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
21 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following code? String s1 = "Java"; String s2 = "Java"; String s3 = new String("Java"); System.out.println(s1 == s2); System.out.println(s1 == s3);
true, true
true, false
false, true
false, false
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be printed? String s = "abc"; s.concat("def"); System.out.println(s);
abc
abcdef
def
Compilation error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct statement:
StringBuilder is synchronized.
StringBuffer is not synchronized.
StringBuilder is faster but not thread-safe.
String is mutable.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output? StringBuilder sb = new StringBuilder("123"); sb.reverse(); System.out.println(sb);
123
321
Error
1 2 3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this print? String str = "hello"; str.toUpperCase(); System.out.println(str);
HELLO
hello
Error
null
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of these methods is NOT available in StringBuilder?
append()
reverse()
charAt()
trim()
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which creates a new object each time it's modified?
String
StringBuffer
StringBuilder
All of the above
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
20 questions
Quiz 1 - Tier 1 Junior Assistant
Quiz
•
Professional Development
20 questions
Emoji trivia
Quiz
•
KG - Professional Dev...
20 questions
Pre Assessment KSMS HO
Quiz
•
Professional Development
16 questions
Kuiz Medication Safety 1
Quiz
•
Professional Development
20 questions
CONSERVADORA UD 1
Quiz
•
Professional Development
17 questions
Logistics Quizz
Quiz
•
Professional Development
20 questions
VIVANTA 23
Quiz
•
Professional Development
20 questions
UKMT Operasional Bagian 4
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...