I was making a new code where my objective was to make whatever key you press make my little "truck" go forward. I was trying to do this by adding spaces to my string, which was my truck.
String truck = "<o><o>-<o>~|#|¬";
truck = new StringBuffer(truck).insert(0, " ").toString();
System.out.println(truck);
I would like to know how to do a "loop" on this, where it add spaces with the quantity of keys that you pressed. Thanks for reading, have a nice day.