1. Given a one-dimensional array of integers, write a program to insert a new value into the middle of the array. The ne
Posted: Thu Jul 14, 2022 2:10 pm
will give positive rating and comment, must be in java please.thank you
1. Given a one-dimensional array of integers, write a program to insert a new value into the middle of the array. The new value should be provided as input from the keyboard. Your program should work for array of any length. For example, if the value to be inserted is "1 " and the initial array (even length) contains [1,2,3,4,5,6] then the new array would be [1,2,3,−1,4,5,6] and if the initial array (odd length) contains [1,2,3,4,5] then the new array should be [1,2,3,−1,4,5].
1. Given a one-dimensional array of integers, write a program to insert a new value into the middle of the array. The new value should be provided as input from the keyboard. Your program should work for array of any length. For example, if the value to be inserted is "1 " and the initial array (even length) contains [1,2,3,4,5,6] then the new array would be [1,2,3,−1,4,5,6] and if the initial array (odd length) contains [1,2,3,4,5] then the new array should be [1,2,3,−1,4,5].