Java Strings Quiz

Java Strings Quiz

University

35 Qs

quiz-placeholder

Similar activities

Cloud Computing 07 Quiz

Cloud Computing 07 Quiz

University

30 Qs

data mining

data mining

University

30 Qs

Informática

Informática

University

37 Qs

Database Management Systems - Final Examination

Database Management Systems - Final Examination

University

30 Qs

ÔN TẬP CUỐI HK2 TIN HỌC 6 24-25

ÔN TẬP CUỐI HK2 TIN HỌC 6 24-25

6th Grade - University

30 Qs

QUIZ 1 - HTML & Javascript

QUIZ 1 - HTML & Javascript

University

30 Qs

Machine Learning Fundamentals Unit - 1

Machine Learning Fundamentals Unit - 1

University

30 Qs

Cloud Computing

Cloud Computing

University

35 Qs

Java Strings Quiz

Java Strings Quiz

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Ms Viancy V

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to return the length of a string in Java?

lengthOf()

count()

length()

size()

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to convert a string to uppercase?

toUpper()

uppercase()

convertUpper()

toUpperCase()

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which class provides mutable strings in Java?

String

StringBuffer

StringBuilder

StringTokenizer

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the default value of a string variable in Java?

Empty String

null

Whitespace

Undefined

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to compare two strings lexicographically?

equals()

compare()

compareTo()

equalsIgnoreCase()

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is immutable in Java?

String

StringBuffer

StringBuilder

StringTokenizer

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to concatenate two strings in Java?

concat()

append()

merge()

combine()

Create a free account and access millions of resources

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?