In Java, I am trying to print a word that the user inputs 100 times but instead of having it print each instance on a new line, I am trying to print as many as I can on one line and then go to a new line. Would this be easy to do in java? I am new to java so any help would be greatly appreciated! Here is what I have so far below.
public class Main {
public static void main(String[] args) {
String name= "TEST"; //defined for debugging purposes
int i=0;
while (i < 100)
{
System.out.println(name + " ");
i++;
}
}
}