
String in Java
Authored by KarunaiMuthu SriRam
Computers
University
Used 18+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
ARRAYS AND FUNCTIONS
Quiz
•
University
20 questions
PYTHON REVISION
Quiz
•
University
15 questions
Round 2 Debug-The-Code
Quiz
•
University
20 questions
קלט פלט משתנים והוראות השמה
Quiz
•
7th Grade - University
20 questions
Demo Teaching
Quiz
•
University
20 questions
Hashing
Quiz
•
University
20 questions
C - Structures
Quiz
•
University
20 questions
DreamWeaver CS6
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade