Hello redvenice. Welcome to the Java Programming Forums.

You can easily use the Scanner class to do this. I have wrote a quick example for you.

For the purpose of this example I have created a...