I am a high school student who is currently working on a snake game (eating the food version) on java swing (JFrame); in NetBeans IDE 8.0.2. So far I was able to move the snake and randomly generate the food; the snake is eating the food though and is stopping when colliding to the borders/boundaries around the board. But to be honest, I really don't know how to grow the snake from onwards. People suggested me to use an ArrayList so that I can add pieces of the same block(Jpanel). To say the truth, I am not too familiar to ArrayList. So would you guys help me around on how do I make that ArrayList and use that to grow the snake. Also, when the snake is moving forward(at any direction), how do I stop the snake from moving backwards(the opposite of the forward button), shouldn't it be only able to move left, right and forward. I hope you guys get what I mean. Finally, since my food gets randomly generated, it overlaps the snake sometimes and how do I stop the food from getting overlapped on the snakes body.I am a high school student who is currently wor