Sail E0 Webinar

MCQs

Total Questions : 50 | Page 4 of 5 pages
Question 31.

Which of these is wrapper for simple data type char?


  1.    Float
  2.    Character
  3.    String
  4.    Integer
 Discuss Question
Answer: Option B. -> Character

None.


Question 32.

Which of these methods is used to know whether a string contains "true"?


  1.    valueOf()
  2.    valueOfString()
  3.    getString()
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> valueOf()

valueOf() returns true if the specified string contains "true" in lower or uppercase 

Question 33.

Which of these methods is used to know whether a given Character object is 

part of Java's indentifiers?


  1.    isIdentifier()
  2.    isJavaIdentifier()
  3.    isJavaIdentifierPart()
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> isJavaIdentifierPart()

None.


Question 34.

Which of these method of Double wrapper can be used to check weather a given 

value is infinite or not?


  1.    Infinite()
  2.    isInfinite()
  3.    checkInfinite()
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> isInfinite()

isInfinite() methods returns true if specified value is an infinite value otherwise it returns false.

Question 35.

Which of these methods is not defined in both Byte and Short wrappers?


  1.    intValue()
  2.    isInfinite()
  3.    toString()
  4.    hashCode()
 Discuss Question
Answer: Option B. -> isInfinite()

isInfinite() methods is defined in Integer and Long Wrappers, returns true if specified 

Question 36.

Which of these is a super class of wrappers Long, Character & Integer?


  1.    Long
  2.    Digits
  3.    Float
  4.    Number
 Discuss Question
Answer: Option D. -> Number

Number is an abstract class containing subclasses Double, Float, Byte, Short, Integer and Long.


Question 37.

Which of these methods can be used to check whether the given value is a number or not?


  1.    isNaN()
  2.    isNumber()
  3.    checkNaN()
  4.    checkNumber()
 Discuss Question
Answer: Option A. -> isNaN()

isNaN() methods returns true if num specified is not a number, otherwise it returns false.


Question 38.

Which of these is a super class of wrappers Byte and short wrappers?


  1.    Long
  2.    Digits
  3.    Float
  4.    Number
 Discuss Question
Answer: Option D. -> Number

Number is an abstract class containing subclasses Double, Float, Byte, Short, 

Integer and Long.


Question 39.

Which of these is a super class of Character wrapper?


  1.    Long
  2.    Digits
  3.    Float
  4.    Number
 Discuss Question
Answer: Option D. -> Number

Number is an abstract class containing subclasses Double, Float, Byte, Short, 

Question 40.

Which of these methods return string equivalent of Boolean object?


  1.    getString()
  2.    toString()
  3.    converString()
  4.    getStringObject()
 Discuss Question
Answer: Option B. -> toString()

None.

Latest Videos

Latest Test Papers