Please help a java noob
By
Manos
in Programming
in Programming
Go to solution
Solved by has246,
hey
try this:
public void chooseloacation() {
sc = new Scanner(System.in);
while (true) {
x = sc.nextInt();
if (x > 0 && x < 7)
break;
System.out.println("please select a number only from 1 to 6");
}
if (x == 5) {
System.out.println("poutses");
}
}
-
Featured Topics
-
Topics
-
JamZam ·
Posted in Troubleshooting2 -
0
-
0
-
MiszS ·
Posted in Power Supplies2 -
NukoTi ·
Posted in Troubleshooting11 -
4
-
Xenny ·
Posted in New Builds and Planning3 -
7
-
1
-
KazBoy1412 ·
Posted in General Discussion2
-
-
play_circle_filled
Latest From ShortCircuit:
Lian-Li, do this on all of your cases! - Lian-Li O11D x Lamborghini
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now