
String in Java

Quiz
•
Computers
•
University
•
Hard
KarunaiMuthu SriRam
Used 18+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
There is a companion class to string called ………………….., whose objects contain strings that can be modified after they are created.
stringBuffer
stringClass
toString( )
stringChar
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the following code,
string s=new String(); will create an instance of string with
at least one character
a default character
no characters in it
number of characters in it
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
…………………. returns a sting that contains the human-readable equivalent of the value with which it is called.
toValue()
value()
valueOf()
getValue()
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
…………………… method simply return a string that appropriately describes an object of your class.
getChars()
toString()
toCharArray()
getString()
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
To extract a single character from a sting, you can refer directly to an individual character via the …………………… method.
charAt()
getChars()
getCharAt()
getAt()
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
If you need to extract more than one character at a time, you can use the …………………………. .
getBytes()
charAt()
getChars()
getString()
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
If S1 and S2 are two strings, which of the following statements or expressions are correct.
i) String S3=S1+S2;
ii) String S3=S1-S2;
iii) S1<=S2;
iv) S1.compareTo(S2);
i and ii only
ii and iii only
ii and iv only
i and iv only
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
OOP

Quiz
•
University
20 questions
JDBC

Quiz
•
University
20 questions
Review JavaScript

Quiz
•
11th Grade - University
15 questions
JavaScript Basics

Quiz
•
12th Grade - University
19 questions
Java Basic 1 - Quiz

Quiz
•
8th Grade - University
20 questions
DATABASE

Quiz
•
University
15 questions
VECTORES Y MATRICES

Quiz
•
University
20 questions
Code Junction 4

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University