Java Array

Java Array

Assessment

Assessment

Created by

Siti Tanalol

Computers

University

129 plays

Medium

Student preview

quiz-placeholder

23 questions

Show all answers

1.

MULTIPLE CHOICE

30 sec • 1 pt

Is String a primitive data type?

2.

MULTIPLE CHOICE

30 sec • 1 pt

Which method to use to find length of a string?

3.

MULTIPLE CHOICE

30 sec • 1 pt

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

4.

MULTIPLE CHOICE

30 sec • 1 pt

String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";


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

5.

MULTIPLE CHOICE

30 sec • 1 pt

Which is correct method to convert String into uppercase

6.

MULTIPLE CHOICE

30 sec • 1 pt

String txt = "Hello World";

System.out.println(txt.toUpperCase());


Choose the correct output.

7.

MULTIPLE CHOICE

30 sec • 1 pt

Choose correct purpose of indexOf() in String class.

8.

MULTIPLE CHOICE

30 sec • 1 pt

String x = "10";

String y = "20";

String z = x + y;

System.out.println(z);

Guess the output.

9.

MULTIPLE CHOICE

30 sec • 1 pt

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

10.

MULTIPLE CHOICE

30 sec • 1 pt

What is the most appropriate way to check if two Strings are identical?

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?