I am new to Java and I cant fix an error in a script method. It says "variables city and state might not have been initialized"
Here is how I declared the variable:
String city;
String state;
Here is where my errors are:
Scanner scan = new Scanner(System.in);
System.out.println ("Enter the city you grew up in: " + city);
city = scan.nextLine();
System.out.println ("Enter the state you live in: " + state);
state = scan.nextLine();
Can anyone help?