Menu
Question Index
...

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(desktopComputer, 1, noteBooks, 0, noteBooks.length);
        for (String element : noteBooks) {
            System.out.print(element + " ");
        }
    }
}


Acer Apple Dell IBM
Acer Apple ViewSonic Microsoft
Apple Dell IBM Samsung
Compilation Error
Runtime Error

Doubts

Problems

Topic: System Class arraycopy() Method In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App