We want numbers 1 2 3 on the same line separated by spaces.
Step 2: Analyze each option
for(int i=1; i<=3; i++) { System.out.print(i + " "); } prints each number with a space using print, so all stay on same line. for(int i=1; i<=3; i++) { System.out.println(i + " "); } uses println which moves to new line each time. for(int i=1; i<=3; i++) { System.out.print(i); System.out.print("\n"); } prints newline after each number, so numbers appear on separate lines. for(int i=1; i<=3; i++) { System.out.print(i); System.out.print(" "); System.out.println(); } prints newline after each number and space, so also multiple lines.