Java Strings

Java Strings

University

10 Qs

quiz-placeholder

Similar activities

JAVA UNIT 1 PART 3

JAVA UNIT 1 PART 3

University

13 Qs

Intro to Java 1

Intro to Java 1

University

15 Qs

Introdução a Programação

Introdução a Programação

University

12 Qs

Inheritance

Inheritance

University

10 Qs

Introducción a la estructura de datos

Introducción a la estructura de datos

University

10 Qs

OOP Kuiz 1

OOP Kuiz 1

University

12 Qs

Java Static

Java Static

University

10 Qs

Java Strings

Java Strings

1st Grade - Professional Development

10 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?