447). Which of these exceptions is thrown by methods of System class?

[A]IOException
[B]SystemException
[C]SecurityException
[D]InputOutputException

Show Answer

452). What will be the output of the following Java program?
    import java.lang.System;
    class Output
    {
         public static void main(String args[])
         {
             long start, end;   
             start = System.currentTimeMillis();
             for (int i = 0; i < 10000000; i++);
             end = System.currentTimeMillis();
             System.out.print(end - start);
         }
    }

[A]0
[B]1
[C]1000
[D]System Dependent

Show Answer

453). What will be the output of the following Java program?
    import java.lang.System;
    class Output 
    {
        public static void main(String args[])
        {
            byte a[] = { 65, 66, 67, 68, 69, 70 };
            byte b[] = { 71, 72, 73, 74, 75, 76 };  
            System.arraycopy(a, 0, b, 0, a.length);
            System.out.print(new String(a) + " " + new String(b));
        }
    }

[A]ABCDEF ABCDEF
[B]ABCDEF GHIJKL
[C] GHIJKL ABCDEF
[D]GHIJKL GHIJKL

Show Answer

454). What will be the output of the following Java program?
    import java.lang.System;
    class Output 
    {
        public static void main(String args[])
        {
            byte a[] = { 65, 66, 67, 68, 69, 70 };
            byte b[] = { 71, 72, 73, 74, 75, 76 };  
            System.arraycopy(a, 0, b, 3, a.length - 3);
            System.out.print(new String(a) + " " + new String(b));
        }
    }

[A] ABCDEF ABCDEF
[B] ABCDEF GHIJKL
[C]ABCDEF GHIABC
[D]GHIJKL GHIJKL

Show Answer

455). What will be the output of the following Java program?
    import java.lang.System;
    class Output
    {
        public static void main(String args[])
        {
            byte a[] = { 65, 66, 67, 68, 69, 70 };
            byte b[] = { 71, 72, 73, 74, 75, 76 };  
            System.arraycopy(a, 2, b, 3, a.length - 4);
            System.out.print(new String(a) + " " + new String(b));
        }
    }

[A]ABCDEF ABCDEF
[B] ABCDEF GHIJKL
[C] ABCDEF GHIABC
[D]ABCDEF GHICDL

Show Answer