import java.util.Scanner; public class NameRepeat{ public static void main(String[] args){ System.out.print("Name: "); String name = (new Scanner(System.in)).next(); int times = 10; if(name.equalsIgnoreCase("Josh")){ times = 5; } System.out.println(""); for(int i = 0; i < times; i++){ System.out.println(name); } } }