i get no error but my program should be asking me what my favorite color is import java.util.Scanner; public class Assignment2 { public static void main (String [] args) { String firstName, middleName, lastName; int age, luckyNumber; String color; Scanner keyboard = new Scanner(System.in); System.out.println("What is your first name?"); firstName = keyboard.nextLine(); System.out.println("What is your middle name?"); middleName = keyboard.nextLine(); System.out.println("What is your last name?"); lastName = keyboard.nextLine(); System.out.println("How old are you?"); age = keyboard.nextInt(); System.out.println("What is your lucky number?"); luckyNumber = keyboard.nextInt(); System.out.println("What is your favorite color?"); color = keyboard.nextLine(); String fullName = firstName + " " + middleName + " " + lastName; System.out.println("A story about " + fullName + ":"); String fullNameCaps = fullName.toUpperCase(); char firstInitial = firstName.charAt(0); char middleInitial = middleName.charAt(0); char lastInitial = lastName.charAt(0); System.out.println("\t" + fullNameCaps + " is " + firstInitial + middleInitial + lastInitial); System.out.println("\t" + firstInitial + middleInitial + lastInitial + "'s favorite color is " + color + ", and " + firstName + " " + lastInitial + ". is " + luckyNumber); } } Code (markup):
Maybe the program doesn't care about your favorite color Does the program ask you all the questions until your lucky number then stops, or are all questions not appearing? Peace,