JAVA string

JAVA string

12th Grade

18 Qs

quiz-placeholder

Similar activities

JavaScript String Methods

JavaScript String Methods

12th Grade - Professional Development

15 Qs

AP CSA Unit 2 Review

AP CSA Unit 2 Review

9th Grade - University

22 Qs

3rd Qtr QUIZ1 COMPUTER PROGRAMMING-Strings in Java-2-22-2023

3rd Qtr QUIZ1 COMPUTER PROGRAMMING-Strings in Java-2-22-2023

12th Grade

20 Qs

Python Data Types and Operators Skill #1

Python Data Types and Operators Skill #1

12th Grade

13 Qs

Java Unit 3 Booleans Review

Java Unit 3 Booleans Review

11th - 12th Grade

18 Qs

Java - Primitive Type

Java - Primitive Type

11th - 12th Grade

23 Qs

Java Math and String Libraries

Java Math and String Libraries

9th - 12th Grade

14 Qs

Misconceptions Check

Misconceptions Check

9th - 12th Grade

15 Qs

JAVA string

JAVA string

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Quizizz Content

Used 26+ times

FREE Resource

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type gets returned from length() method in String class?

double

String

int

number

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";


What is the correct way to find the length of "txt" string?

int len = length(txt);

float len = txt.length();

int len = txt.length();

double len = length(txt);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is correct method to convert String into uppercase

changeUpperCase()

convertUpperCase()

toUpper()

toUpperCase()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String word = "A few good men";
What is word.charAt(7) ?
o
g
7
good men

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String word = "A few good men";
What is word.length()?
14
15
13

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method to use to find length of a string?

length()

size()

long()

count()

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Choose correct purpose of indexOf() in String class.

returns the index (the position) of the last occurrence of a specified text in a string

returns the character of the first occurrence of a specified character in a string

returns the index (the position) of the first occurrence of a specified text in a string (excluding whitespace)

returns the index (the position) of the first occurrence of a specified text in a string (including whitespace)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?