Java String Flashcard

Java String Flashcard

Assessment

Flashcard

Computers

1st Grade - University

Hard

Created by

M. R.

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

FLASHCARD QUESTION

Front

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

Back

String

2.

FLASHCARD QUESTION

Front

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

Back

+

3.

FLASHCARD QUESTION

Front

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

Back

String str = new String("");

4.

FLASHCARD QUESTION

Front

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

Back

\"

5.

FLASHCARD QUESTION

Front

What will be the result of the following code: String x = "50"; int y = 20; String z = x + y;

Back

5020

6.

FLASHCARD QUESTION

Front

Which escape sequence represents a new line in Java?

Back

\n

7.

FLASHCARD QUESTION

Front

What will be the output of the following code: String str = "Hello"; System.out.println(str.length());

Back

5

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?