String and type wrappers

String and type wrappers

9th Grade

10 Qs

quiz-placeholder

Similar activities

week 1 basic java coding language

week 1 basic java coding language

9th - 12th Grade

12 Qs

Prueba de Java

Prueba de Java

9th - 12th Grade

10 Qs

The Technology Life

The Technology Life

8th - 12th Grade

14 Qs

Pengantar C/C++/Java

Pengantar C/C++/Java

1st - 12th Grade

9 Qs

java variables 1

java variables 1

9th - 12th Grade

13 Qs

Javascript

Javascript

KG - Professional Development

13 Qs

Computer Science - Python

Computer Science - Python

9th - 12th Grade

15 Qs

Python Print Statement

Python Print Statement

6th - 10th Grade

12 Qs

String and type wrappers

String and type wrappers

Assessment

Quiz

Computers

9th Grade

Hard

Created by

RAVINDRA INDURTHI

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String in Java is a?

class

object

variable

character array

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these method of String class can be used to test to strings for equality?

isequal()

isequals()

equal()

equals()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements are incorrect?

String is a class

Strings in java are mutable

Every string is an object of class String

Java defines a peer class of String, called StringBuffer, which allows string to be altered

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

class string_demo

{

public static void main(String args[])

{

String obj = "I" + "like" + "Java";

System.out.println(obj);

}

}

I

like

Java

IlikeJava

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

class output

{

public static void main(String args[])

{

StringBuffer s1 = new StringBuffer("Hello");

StringBuffer s2 = s1.reverse();

System.out.println(s2);

}

}

Hello

olleH

HelloolleH

olleHHello

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

class output

{

public static void main(String args[])

{

StringBuffer c = new StringBuffer("Hello");

c.delete(0,2);

System.out.println(c);

}

}

He

Hel

lo

llo

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these method of class StringBuffer is used to find the length of current character sequence?

length()

Length()

capacity()

Capacity()

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?