Hello StackExchange Community, I am noob with Java and want to index elements of an array MATLAB style. E.g., In MATLAB if I want to read the last 10 elements of an array I can type:
someArray = someOtherArray(end-10:end);
In Java, I can only think to use a for-loop, which seems rather inconvenient. Are there array methods in Java that do this? Should I write my own class and methods? Why or why not? Thanks, Kyle
P.S. I am actually trying to create a Processing sketch, but it seems Java rules of array usage have been inherited.