A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

101. Which of these methods of Byte wrapper can be used to obtain Byte object from a string?
a. toString()
b. getString()
c. decode()
d. encode()
View Answer Report Discuss Too Difficult!
Answer: (c).decode()

102. Which of the following methods Byte wrapper return the value as a double?
a. doubleValue()
b. converDouble()
c. getDouble()
d. getDoubleValue()
View Answer Report Discuss Too Difficult!
Answer: (a).doubleValue()

103. Which of these is a super class of wrappers Byte and short wrappers?
a. Long
b. Digits
c. Float
d. Number
View Answer Report Discuss Too Difficult!
Answer: (d).Number

104. Which of these methods is not defined in both Byte and Short wrappers?
a. intValue()
b. isInfinite()
c. toString()
d. hashCode()
View Answer Report Discuss Too Difficult!
Answer: (b).isInfinite()

105. What is the output of this program?
    class Output 
    {
        public static void main(String args[])
        {
            Double i = new Double(257.5);  
            Double x = i.MAX_VALUE;
            System.out.print(x);
        }
    }
a. 0
b. 1.7976931348623157E308
c. 1.7976931348623157E30
d. None of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (b).1.7976931348623157E308

106. What is the output of this program?
    class Output
    {
        public static void main(String args[])
        {
            Double i = new Double(257.5);  
            Double x = i.MIN_VALUE;
            System.out.print(x);
        }
    }
a. 0
b. 4.9E-324
c. 1.7976931348623157E308
d. None of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (b).4.9E-324

107. What is the output of this program?
    class Output 
    {
        public static void main(String args[])
        {
     Double i = new Double(257.578123456789);  
            float x = i.floatValue();
            System.out.print(x);
        }
    }
a. 0
b. 257.0
c. 257.57812
d. 257.578123456789
View Answer Report Discuss Too Difficult!
Answer: (c).257.57812

108. Which of these methods of Character wrapper can be used to obtain the char value contained in Character object.
a. get()
b. getVhar()
c. charValue()
d. getCharacter()
View Answer Report Discuss Too Difficult!
Answer: (c).charValue()

109. Which of the following constant are defined in Character wrapper?
a. MAX_RADIX
b. MAX_VALUE
c. TYPE
d. All of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (d).All of the mentioned

110. Which of these is a super class of Character wrapper?
a. Long
b. Digits
c. Float
d. Number
View Answer Report Discuss Too Difficult!
Answer: (d).Number