You'll have to post more code than that, there's nothing wrong with what you've posted so far, though (assuming that console is an instance of Scanner)

As a side note, strangely enough, the...