Programming - String Buffers
You Are Here :: Home > JAVA > String Buffers - General Questions
13. |
which are not present in String class?
|
A. |
insert() |
B.
|
delete() |
C.
|
reverse()
|
D.
|
none
|
|
Answer: Option D
Explanation:
All are present in String class. |
|
14. |
For creating several threads which is used?
|
A. |
StringBuilder |
B.
|
StringBuffer |
C.
|
none
|
D.
|
both
|
|
Answer: Option B
Explanation:
StringBuffer is used for creating several threads. |
|
15. |
Method for making String reverse?
|
A. |
stringbuffer reverse() |
B.
|
Stringbuffer reverse() |
C.
|
StringBuffer Reverse()
|
D.
|
StringBuffer reverse()
|
|
Answer: Option B
Explanation:
StringBuffer reverse() is used for reversing the string. |
|
16. |
why index of method is used ________________
|
A. |
to return the object at last occurrence |
B.
|
to return object at index point |
C.
|
to return the object at first occurrence
|
D.
|
none
|
|
Answer: Option A
Explanation:
Indexof() method is used to return object at last occurrence |
|
17. |
To get substring position at last can be done by method?
|
A. |
int lastIndexOf(String str) |
B.
|
char lastIndexOf(String str) |
C.
|
int lastIndexof(String str)
|
D.
|
char lastIndexof(String str)
|
|
Answer: Option A
Explanation:
To get substring position at last can be done by method int lastIndexOf(String str). |
|
18. |
Method for replacing the string?
|
A. |
StringBuffer(int I,int j,String str) |
B.
|
StringBuffer replace(int I,int j) |
C.
|
Stringbuffer replace(int I,int j,string str)
|
D.
|
StringBuffer replace(int I,int j,string str)
|
|
Answer: Option D
Explanation:
StringBuffer replace(int I,int j,String str) is used for string replacement. |
|
« prev
next »