When I enter string variables After this point, the program prints only inside the other statement that is printed out. The only string variable that is responding to the program is Code: Do you know that every time you type If your b and
p , I enter Have not clicked the key several times
j .
Package is valid; Import java.util.Scanner; Public class gaming {public static zero main (string agre []) {scanner sc = new scanner (system.); String J = "Well, how are you?"; String b = "good"; String p = "bad"; System.out.println ("Hello, my name is Julie robot"); System.out.println ("How are you?"); If (j.equals (sc.nextLine ()) {System.out.println ("Im doing great!"); } Else if (b.equals (sc.nextline ()) {System.out.println ("Dude's Great! :)"); } Else if (p.equals (sc.nextLine ()) {System.out.println ("Not Good"); } Else {System.out.println ("I see ..."); }
sc.nextLine ( ) Are you asking the user for new input?
if s and the store try to use it one time before receiving the input in value, then use that value in the circumstances < / Div>
No comments:
Post a Comment