import java.util.Scanner;
import static java.lang.System.out;
public class main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int Safeties;
out.print("Safeties:");
Safeties = input.nextInt();
out.print("Home Team:");
String HomeTeam = input.nextLine();
out.print("Touchdowns:");
double Touchdown2 = input.nextDouble();
}
}
The output is:
Safties:
Home Team:Touchdowns:
But it's supposed to be
Safties:
Home Team:
Touchdowns:
I'm assuming it's because I have an int above a string but I don't know how to fix this problem. I need them in that order. I'm completely lost. Can anyone help?