Lets say I want to make a loop or something that prints out, for example, \"Mario\" every second. How can I do this? Can\'t seem to find any good tutorials that teach this a
new Timer().scheduleAtFixedRate(task, after, interval);
task is the method you want to execute, after is the amount of time till the first execution and interval is the time between executions of aforementioned task.