import java.util.Scanner; public class Name { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); System.out.print("What is your name? "); String name = keyboard.next(); System.out.println(); int target = 10; if (name.equals("Josh")) target = 5; for (int n = 1; n <= target; n++) { System.out.println(name); } } }