3 Java Duplicate An Element Description
3 Java Duplicate An Element Description
Priyadarshi Mrinal .
Duplicate an element
Anju wants to write a Java program to duplicate an element from a set of elements.Get the array size and elements .Get the position of the element to be replicated at the
end of the array.If the position given is greater than the size of an array display the message as "Position is greater than the size of an array".If the size of the array is zero
or lesser then display the message "Invalid array size".Please help her out for solving the above scenario .
Sample Input 1:
34
56
78
56
90
Sample Output 1 :
34
56
78
56
90
78
Sample Input 2:
Sample Output 2:
Sample Input 3:
12
35
Sample Output 3:
https://accenturelearning.tekstac.com/mod/vpl/view.php?id=1010 1/2
11/12/2020 3 Java Duplicate an element Description
User Notes
Add a note...
Powered by Tekstac
https://accenturelearning.tekstac.com/mod/vpl/view.php?id=1010 2/2