Question: Java-programming. How can I make the code below update the coordinates for pos[X] and pos[Y] everytime i type in a number? I would like it
Java-programming. How can I make the code below update the coordinates for pos[X] and pos[Y] everytime i type in a number?
I would like it to work, so if the beginning coordinates are (0,0) and I enter 6, the variable pos will become pos=[1,0], or by entering 2 it becomes [0,1], I have put a picture of the window output I want to achieve, where there's been pressed 6, 2, 6, 9.

![pos[X] and pos[Y] everytime i type in a number? I would like](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66e3e4bd76640_26066e3e4bcc7d1d.jpg)

public class RaceTrack t final static int x = 0; final static int Y = 1; static List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
