Google is your best friend for these types of questions. Googling and reading tutorials and API documentation is a huge part of programming.
This is the first result for googling "java importing"...
Type: Posts; User: KevinWorkman
Google is your best friend for these types of questions. Googling and reading tutorials and API documentation is a huge part of programming.
This is the first result for googling "java importing"...
This is the first result for googling "java scanner tutorial": Scanning (The Java™ Tutorials > Essential Classes > Basic I/O)
That seems like a goofy way to get input. Why don't you use a Scanner instead?
Putting this inside a loop (such as a do-while loop) is reasonable. Just make sure you give the user a way to exit...