Instruction
- Total number of questions : 10.
- Time alloted : 10 minutes.
- Each question carry 1 mark.
- No Negative marks
- DO NOT refresh the page.
- All the best :-).
1. |
Which of these constructors is used to create an empty String object? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: None . |
2. |
Which of these methods can be used to convert all characters in a String into a character array? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: charAt() return one character only not array of character. |
3. |
Which of the following statement is correct? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: replace() method replaces all occurrences of one character in invoking string with another character. |
4. |
Which of the following statement is correct? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: reverse() method reverses all characters. It returns the reversed object on which it was called. |
5. |
Which of the following are incorrect form of StringBuffer class constructor? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: None. |
6. |
Which of these data type value is returned by equals() method of String class? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: equals() method of string class returns boolean value true if both the string are equal and false if they are unequal. |
7. |
Which of the following is correct way of importing an entire package ‘pkg’? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: Operator * is used to import the entire package. |
8. |
Which of the following is correct way of implementing an interface salary by class manager? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None. |
9. |
Which of the following is method of wrapper Float for converting the value of an object into byte? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None. |
10. |
Which of the following is method of wrapper Integer for converting the value of an object into int? |
|||||||||||||||||||
|