418). 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()

Show Answer

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

[A]Long
[B]Digits
[C]Float
[D]Number

Show Answer

422). 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()

Show Answer

423). What will be the output of the following Java 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

Show Answer

424). What will be the output of the following Java 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

Show Answer

425). What will be the output of the following Java program?
    class Output 
    {
        public static void main(String args[]) 
        {
            Integer i = new Integer(257);  
            float x = i.floatValue();
            System.out.print(x);
        }
    }

[A]0
[B]1
[C]257
[D]257.0

Show Answer

426). What will be the output of the following Java program?
    class Output 
    {
        public static void main(String args[]) 
        {
            Long i = new Long(256);  
            System.out.print(i.hashCode());
        }
    }

[A]256
[B] 256.0
[C]256.00
[D]257.00

Show Answer