Both code give same output but in lecture they said write second one not first code........i don't see any difference

package cruxonline;
import java.util.Scanner;
public class Pattern0 {

public static void main(String[] args) {
	// TODO Auto-generated method stub

	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	for(int r =0;r<n;r++)
	{
		System.out.println("*");
		
	}
			
}

}

and
package cruxonline;
import java.util.Scanner;
public class Pattern0 {

public static void main(String[] args) {
	// TODO Auto-generated method stub

	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	for(int r =0;r<n;r++)
	{
		System.out.println("*");
		
	}
			
}

}

@mayanktiwari6957 Bro you yourself has sent the same code, so obviously both will print the same output. both the codes sent by you are exactly same.