JAVA - Day2

JAVA - Day2

University

15 Qs

quiz-placeholder

Similar activities

มัลติมีเดีย 2

มัลติมีเดีย 2

6th Grade - University

10 Qs

Sistem Komputer- Fase E

Sistem Komputer- Fase E

10th Grade - University

17 Qs

IoT - Primer Parcial

IoT - Primer Parcial

University

20 Qs

Machine Learning Preprocessing Essentials

Machine Learning Preprocessing Essentials

University

10 Qs

Quiz sobre la Historia de la Computadora

Quiz sobre la Historia de la Computadora

9th Grade - University

15 Qs

Python

Python

University

20 Qs

2F-1 | Python Quiz | 14/10/2024

2F-1 | Python Quiz | 14/10/2024

University

20 Qs

PPL 223 - (QUIZ 3) Data Types and Structures

PPL 223 - (QUIZ 3) Data Types and Structures

University

15 Qs

JAVA - Day2

JAVA - Day2

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Chitra Muthu

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following is immutable in Java?

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?