Java Strings

Java Strings

University

10 Qs

quiz-placeholder

Similar activities

code trivia

code trivia

University

15 Qs

Quiz6: Functions

Quiz6: Functions

University

10 Qs

c-languiz

c-languiz

University

10 Qs

Java Programming

Java Programming

University

15 Qs

Chapter 4 การสืบทอด Class

Chapter 4 การสืบทอด Class

University

10 Qs

CIS18A Quiz 1 Review Game

CIS18A Quiz 1 Review Game

University

15 Qs

JavaScript Quiz | For Beginners

JavaScript Quiz | For Beginners

1st Grade - University

10 Qs

PBO TRKJ

PBO TRKJ

University

12 Qs

Java Strings

Java Strings

Assessment

Quiz

Computers

University

Medium

Created by

Shravya R

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following snippet?

Hello Java

Java Hello

Hello

String cannot be modified.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is not a method of String class?

charAt()

getChars()

getString()

toCharArray()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Strings in Java can be created using:

String

StringBuffer

StringBuilder

All of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To which package does the string class belong to?

java.io

java.util

java.lang

javax.conn

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given this snippet , char chars[] = { 'a', 'b', 'c', 'd', 'e', 'f' };

String s = new String(chars, 2, 3);

What is the value of s?

abc

cde

bc

def

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

byte ascii[] = {65, 66, 67};

String s1 = new String(ascii);

What is the value of s1?

656657

67

ABC

abc

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

toString() belongs to ------- class?

String

Scanner

Object

Main

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?