arrays and strings in java

arrays and strings in java

12th Grade

25 Qs

quiz-placeholder

Similar activities

Database Relationships Quiz

Database Relationships Quiz

12th Grade - University

20 Qs

Google

Google

7th - 12th Grade

20 Qs

Lecture Exercise Topic 1.3

Lecture Exercise Topic 1.3

12th Grade

21 Qs

Logika & Pemrograman (ID)

Logika & Pemrograman (ID)

10th Grade - Professional Development

20 Qs

Quiz ASJ

Quiz ASJ

12th Grade

20 Qs

quiz_G10

quiz_G10

12th Grade

20 Qs

Quiz1_12&11_2t_20214

Quiz1_12&11_2t_20214

12th Grade

20 Qs

2^ Quiz 3I

2^ Quiz 3I

12th Grade

20 Qs

arrays and strings in java

arrays and strings in java

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Geetu Chopra

Used 56+ times

FREE Resource

AI

Enhance your content in a minute

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

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is String a primitive data type?

Yes

No

Both

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

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)

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

What will be the output of below code?


String statement = "Outfit of the day";

System.out.println(statement.Substring(3,6));

it of

tfit

fit

FIT

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Choose most appropriate purpose of trim() method in String?

to remove white spaces

to get a substring of the string

to cut String at desired index

to remove extra white spaces from start and end of String

6.

MULTIPLE SELECT QUESTION

1 min • 1 pt

(Multiple answer question)

Pick all NON-primitive datatypes from below :

String

int

primitive

Array

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct relation between length and last-index of array?

last-index is always 1 more than the length

last-index is 1 less than the length (but not always)

last-index is always 1 less than the length

last-index is always equal to the length

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?

Discover more resources for Computers