Menu
Topics Index
...
`

Computer Equipment Manufacturers2448


If you need explanation Read this topic

If you need Answer Take test on this topic

Computer Equipment Manufacturers2448
What will be the output of the following program?
public class Manufacturers {
    public static void main(String[] args) {
        String desktopComputer[] = {"Acer", "Apple", "Dell", "IBM", "Samsung"};
        String noteBooks[] = {"KOBO", "Google", "ViewSonic", "Microsoft"};
        System.arraycopy(noteBooks, 0, desktopComputer, 0, desktopComputer.length);
        for (String element : noteBooks) {
            System.out.print(element + " ");
        }
    }
}

A. KOBO Google ViewSonic Microsoft
B. KOBO Google ViewSonic Microsoft Samsung
C. Compilation Error
D. Runtime Error
Topic: System Class arraycopy() Method In Java

If you need explanation Read this topic

If you need Answer Take test on this topic

User comments below. All of them might not be correct.

ans D java.lang.ArrayIndexOutOfBoundsException since desktopcomputers array length is 5 and notebooks is 4 size mismatch..cannotcopy

Posted by Vicky Maduri    2014-09-09 03:47:58


D ,, coz of arrayindexoutofbounds exception not declared,,,

Posted by Raju VarshnEy    2014-09-09 04:21:35


D exception in main array index out of bounds

Posted by Rohit Baranwal    2014-09-09 05:09:07


Congratulations Raju VarshnEy . You are this dose winner. We will send you the link using which you can claim your recharge.

Posted by Merit Campus    2014-09-10 04:21:00


© meritcampus 2019

All Rights Reserved.

Open In App