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.

1. Which of these classes is not included in java.lang?
a. Byte
b. Integer
c. Array
d. Class
View Answer Report Discuss Too Difficult!
Answer: (c).Array

2. Which of these is a process of converting a simple data type into a class?
a. type wrapping
b. type conversion
c. type casting
d. none of the Mentioned.
View Answer Report Discuss Too Difficult!
Answer: (a).type wrapping

3. Which of these is a super class of wrappers Double & Integer?
a. Long
b. Digits
c. Float
d. Number
View Answer Report Discuss Too Difficult!
Answer: (d).Number

4. Which of these is a wrapper for simple data type float?
a. float
b. double
c. Float
d. Double
View Answer Report Discuss Too Difficult!
Answer: (c).Float

5. Which of the following is a method of wrapper Float for converting the value of an object into byte?
a. bytevalue()
b. byte byteValue()
c. Bytevalue()
d. Byte Bytevalue()
View Answer Report Discuss Too Difficult!
Answer: (b).byte byteValue()

6. Which of these methods is used to check for infinitely large and small values?
a. isInfinite()
b. isNaN()
c. Isinfinite()
d. IsNaN()
View Answer Report Discuss Too Difficult!
Answer: (a).isInfinite()

7. Which of the following package stores all the simple data types in java?
a. lang
b. java
c. util
d. java.packages
View Answer Report Discuss Too Difficult!
Answer: (a).lang

8. What is the output of this program?
    class isinfinite_output 
    {
        public static void main(String args[]) 
        {
            Double d = new Double(1 / 0.);  
            boolean x = d.isInfinite();
            System.out.print(x);
        }
    }
a. 0
b. 1
c. true
d. false
View Answer Report Discuss Too Difficult!
Answer: (c).true

9. What is the output of this program?
    class isNaN_output 
    {
        public static void main(String args[]) 
        {
            Double d = new Double(1 / 0.);  
            boolean x = d.isNaN();
            System.out.print(x);
        }
    }
a. 0
b. 1
c. true
d. false
View Answer Report Discuss Too Difficult!
Answer: (d).false

10. What is the output of this program?
    class binary 
    {
         public static void main(String args[]) 
         {
             int num = 17;
             System.out.print(Integer.toBinaryString(num));
         }
    }
a. 1001
b. 10011
c. 11011
d. 10001
View Answer Report Discuss Too Difficult!
Answer: (d).10001

Page 1 of 22