Which of the following is immutable in Java?

JAVA - Day2

Quiz
•
Information Technology (IT)
•
University
•
Hard
Chitra Muthu
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
String
StringBuffer
StringBuilder
Both B and C
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following code?
String s1 = "Hello";
String s2 = "Hello";
System.out.println(s1 == s2);
true
false
Compilation error
Runtime error
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following is used to create a mutable string in Java?
String
StringBuffer
StringBuilder
Both B and C
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which method is used to get the length of a string?
size()
length()
getSize()
getLength()
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following is thread-safe?
String
StringBuffer
StringBuilder
Both A and B
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following code?
String s = "Java";
s.concat("Programming");
System.out.println(s);
JavaProgramming
Java
Compilation Error
Runtime Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following class provides fast and efficient string modification?
String
StringBuffer
StringBuilder
Both B and C
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
CMDP2060 - Programming Design and Implementation (W01 - W03)

Quiz
•
University
16 questions
Kuis Uji Pemahaman Python Variabel, Sintaks Dasar, Type Data

Quiz
•
11th Grade - University
20 questions
Java MCQs on Syntax and Semantics

Quiz
•
University
10 questions
Quiz Meet 3 Mini SC Programing

Quiz
•
University
15 questions
Java_MCQ_3

Quiz
•
University
10 questions
Refresh Python

Quiz
•
University
13 questions
Python Programming Quiz

Quiz
•
University
10 questions
Quiz on Basics of C

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade