Console input

I’ve actually been programming for a while, so it seems weird to post on this board…

How can you take console input? I’ve been trying for a while now, and my code works once but it crashes if you try to enter anything else. I’m going to represent my high school at a programming competition and they require the I/O to be thru the console.

euh what is the problem? There is System.in and then it works like any other stream.