Java Language | 10 Minute‐Test 19


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 class is superclass of String and StringBuffer class?

A.
java.util
B.
java.lang
C.
ArrayList
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

None.

2.

Which of these method of class String is used to extract more than one character at a time a String object?

A.
getchars()
B.
GetChars()
C.
Getchars()
D.
getChars()

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

None

3.

Which of these method of class String is used to extract a substring from a String object?

A.
substring()
B.
Substring()
C.
SubString()
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

4.

Which of these class is used to create an object whose character sequence is mutable?

A.
String()
B.
StringBuffer()
C.
Both of the mentioned
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

StringBuffer represents growable and writeable character sequence.

5.

Which of these method of class StringBuffer is used to extract a substring from a String object?

A.
substring()
B.
Substring()
C.
SubString()
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

6.

Which of these method of class String is used to compare two String objects for their equality?

A.
equals()
B.
Equals()
C.
isequal()
D.
Isequal()

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

7.

Which of these keywords is used to define packages in Java?

A.
pkg
B.
Pkg
C.
package
D.
Package

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

None.

8.

Which of these keywords is used to define interfaces in Java?

A.
interface
B.
Interface
C.
intf
D.
Intf

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

9.

Which of these classes is not included in java.lang?

A.
Byte
B.
Integer
C.
Array
D.
Class

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

Array class is a member of java.util.

10.

Which of these is a wrapper for data type int?

A.
Integer
B.
Long
C.
Byte
D.
Double
Submit your test now to view the Results and Statistics with answer explanation.