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.

11. Which of these is a wrapper for data type int?
a. Integer
b. Long
c. Byte
d. Double
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Integer

12. Which of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object?
a. int hash()
b. int hashcode()
c. int hashCode()
d. Integer hashcode()
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).int hashCode()

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

14. Which of these is a wrapper for simple data type char?
a. Float
b. Character
c. String
d. Integer
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Character

15. Which of the following is method of wrapper Integer for converting the value of an object into int?
a. bytevalue()
b. int intValue();
c. Bytevalue()
d. Byte Bytevalue()
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).int intValue();

16. Which of these methods is used to obtain value of invoking object as a long?
a. long value()
b. long longValue()
c. Long longvalue()
d. Long Longvalue()
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).long longValue()

17. What is the output of this program?
    class Output 
    {
        public static void main(String args[]) 
        {
            char a[] = {'a', '5', 'A', ' '};   
            System.out.print(Character.isDigit(a[0]) + " ");
            System.out.print(Character.isWhitespace(a[3]) + " ");
            System.out.print(Character.isUpperCase(a[2]));
        }
    }
a. true false true
b. false true true
c. true true false
d. false false false
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).false true true

18. What is the output of this program?
    class Output 
    {
        public static void main(String args[]) 
        {
            Integer i = new Integer(257);  
            byte x = i.byteValue();
            System.out.print(x);
        }
    }
a. 0
b. 1
c. 256
d. 257
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).1

19. Which of these class have only one field ‘TYPE’?
a. Void
b. Process
c. System
d. Runtime
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Void

20. Which of the following method of Process class can terminate a process?
a. void kill()
b. void destroy()
c. void terminate()
d. void exit()
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).void destroy()

Page 2 of 22