JAVA string

JAVA string

12th Grade

18 Qs

quiz-placeholder

Similar activities

Bài 29. Nhận biết lỗi chương trình

Bài 29. Nhận biết lỗi chương trình

9th - 12th Grade

14 Qs

Soal VLAN

Soal VLAN

1st - 12th Grade

20 Qs

Unit-1 Computational Thinking

Unit-1 Computational Thinking

9th - 12th Grade

20 Qs

Quiz sobre Variables, Constantes y Tipos de Datos

Quiz sobre Variables, Constantes y Tipos de Datos

12th Grade

14 Qs

Web Design: Link, Image, List and Table

Web Design: Link, Image, List and Table

9th - 12th Grade

13 Qs

Ap computer science a

Ap computer science a

1st - 12th Grade

15 Qs

C# start

C# start

11th - 12th Grade

22 Qs

INTRODUCCIÓN A LOS ALGORITMOS

INTRODUCCIÓN A LOS ALGORITMOS

9th - 12th Grade

20 Qs

JAVA string

JAVA string

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Wayground Content

Used 26+ times

FREE Resource

AI

Enhance your content in a minute

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

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)

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?