So thank you it worked much better now. But now the problem is that the user need to type in 2 times to get the code work. I want the method combo() to save input so that I can use it again in open()...
Type: Posts; User: 19xx62xx14
So thank you it worked much better now. But now the problem is that the user need to type in 2 times to get the code work. I want the method combo() to save input so that I can use it again in open()...
To open the lock the user need to type right left right and it should pop up a message that the lock is opened and thats the problem. Even if input is right left right the message dont pop up. It...
1) Choose combo
2) Reset
3) Try to open the lock
4) Finish
1
The lock has a three combo code. First right or left?
right
Second. Do you want to turn right or left?
left
Third. Do you want...
Its a logical problem so it does not pop up anything in the console. I have put some comments in my code, I also think it has something to do with the user input and scanner but I tried different...
import java.util.Scanner;
public class Chapter8{
// user need to find the combo to open the lock
// the right combo is first right, left and then right
Scanner userInput = new...