Search Header Logo

Java strings

Authored by Jamunadevi T

Computers

University

Used 7+ times

Java strings
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In java, String is treated as

primitive type

object

wrapper class

abstract class

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String s=new String("TIH");

How many objects are created for the above statement in java?

0

1

2

3

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not related to comparing Strings in java?

compare()

compareTo()

equals()

==

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns byte array of string?

bytes()

toBytes()

getBytes()

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following method returns a string by replacing all the sequence of characters matching the regex?

replace()

replaceAll()

Both

None

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?

Discover more resources for Computers