Java String Quiz

Java String Quiz

1st Grade - University

20 Qs

quiz-placeholder

Similar activities

flowol week 3

flowol week 3

9th - 12th Grade

17 Qs

ICT Unit-2

ICT Unit-2

University

20 Qs

Coding Quiz

Coding Quiz

6th - 10th Grade

15 Qs

Practice Quiz QBASIC and Excel Functions

Practice Quiz QBASIC and Excel Functions

5th Grade

20 Qs

Kuis Pemrograman Dasar

Kuis Pemrograman Dasar

University

20 Qs

INTRODUCING PYHTON

INTRODUCING PYHTON

7th Grade

16 Qs

Security and Ethics

Security and Ethics

9th - 12th Grade

17 Qs

Một số khái niệm về lập trình và ngôn ngữ lập trình

Một số khái niệm về lập trình và ngôn ngữ lập trình

KG - 12th Grade

15 Qs

Java String Quiz

Java String Quiz

Assessment

Quiz

Computers

1st Grade - University

Practice Problem

Medium

Created by

M. R.

Used 17+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the type of objects that can store a sequence of characters in Java?

Character

String

Array

Text

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used for both addition and concatenation in Java?

/

-

*

+

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a string using the new keyword in Java?

String str = new String[];

String str = String.new();

String str = new String("");

String str = new String();

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What escape character is used to insert a double quote in a string?

\"

\'

\\

\n

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of the following code:

String x = "50";

int y = 20;

String z = x + y;

50.20

50

5020

70

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which escape sequence represents a new line in Java?

\b

\r

\t

\n

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code:

String str = "Hello";

System.out.println(str.length());

5

4

Null

6

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?