package com.company;
import java.util.Arrays;
public class Main {
public static int [] copyArrayFromLowtoHigh(int [] arr, int low, int high){
int N = (high - low) + 1;
int [] result = new int[N];
for (int i = 0; i < N; i++){
result[i] = arr[low++];
}
return result;
}
public static void main(String[] args) {
int [] arr = {1, 3, 4, 56, 22, 11, 12, 45, 78, 32, 11};
System.out.println(Arrays.toString(copyArrayFromLowtoHigh(arr, 1, 4)));
// write your code here
}
}
Comments
It is just a placeholder for further modifications. The program is complete.
Can write the full code pls? // write code here thanks
Dear Sherlynn, Questions in this section are answered for free. We can't fulfill them all and there is no guarantee of answering certain question but we are doing our best. And if answer is published it means it was attentively checked by experts. You can try it yourself by publishing your question. Although if you have serious assignment that requires large amount of work and hence cannot be done for free you can submit it as assignment and our experts will surely assist you.
this question has not been answer yet
Leave a comment