I'm new to java and at some points, I had to delete half or some part of an array!
Also, I know we can delete an element by index or looping in an array of integers in java.
However, I would like to know is it possible to delete some part of a sorted array in java in one iteration trying to avoid looping in array? let say we have an array of integers like [ 1, 3, 4, 7, 8, 10, 15]
then I want to delete from 7 to 15
OR delete from 1 to 7
can I delete all the elements 7,8,10,15 in one iteration without looping?
if there is one can you show me an example!
thank you so much.