Let's say i have a button. When i click on it the first if-statment will run, the the second button click next if-statment will go and so forth. I know the Scanner class will wait for a input. Is there a way on the web?
I just want something to happend behind the webpage the backend. I have only one button to click on. When i click on it the first if-statment will run, the the second button click next if-statment will go and so forth.
But when i click on it all if statment will run. I want the same effect like the util.Scanner class on console.
It's it possible ?
My web application is to make a xml file for the user. But some xml will have diffrent structure. Which is why my if-statment do.
I succeed to create xml files on console with diffrent structure but only with Scanner.
But now i am trying to move to web.
What button? You haven't shown a button; you appear to be taking input from the keyboard. But that is an acceptable way to take keyboard input. You might be better off with a switch statement, however.
DT is right: decide what you are doing before you try to work out how to do it.
I suggest you try a little program which takes YES/NO from the keyboard and simply prints JA/NEJ. That will allow you to practise keyboard input, and later you can insert that as a component in a larger program.