MCQOPTIONS
Saved Bookmarks
This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your Java knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of this method of class StringBuffer is used to get the length of the sequence of characters? |
| A. | length() |
| B. | capacity() |
| C. | Length() |
| D. | Capacity() |
| Answer» E. | |
| 2. |
Which of this method of class StringBuffer is used to reverse sequence of characters? |
| A. | reverse() |
| B. | reverseall() |
| C. | Reverse() |
| D. | reverseAll() |
| Answer» B. reverseall() | |
| 3. |
one |
| A. | two |
| B. | onetwo |
| C. | twoone |
| Answer» B. onetwo | |
| 4. |
Which of these methods of class StringBuffer is used to extract a substring from a String object? |
| A. | substring() |
| B. | Substring() |
| C. | SubString() |
| D. | None of the mentioned |
| Answer» B. Substring() | |