I'm trying to find out if it's possible with the capabilities of Java, without having to right helper methods but rather do it in a few lines of code.
So what I am looking for is essentially a list with a set amount of entries.
So like
I essentially want to set the latestVisitor to recentVisitors[0] and move everyone ++ except for the last guy, which he would simply be GC'd.
I UNDERSTAND that I can do this with my array. I was curious if Java has something that does this, I know there's a lot of shit that I don't know about so I am just trying to expand my knowledge.
Thanks in advance,
- Loses
So what I am looking for is essentially a list with a set amount of entries.
So like
Code
int[] recentVisitors = new int[5];I essentially want to set the latestVisitor to recentVisitors[0] and move everyone ++ except for the last guy, which he would simply be GC'd.
I UNDERSTAND that I can do this with my array. I was curious if Java has something that does this, I know there's a lot of shit that I don't know about so I am just trying to expand my knowledge.
Thanks in advance,
- Loses


![[Image: TEGE4Zx.png]](https://i.imgur.com/TEGE4Zx.png)