Java Input/Output  « Prev 

Read using BufferedReader - Exercise

Modify your program

Take the program you wrote for the previous exercise and make it read using a BufferedReader object. You can use System.in as this stream's target, and you can use the method readLine() to read what the user types with the keyboard.
As before, this program should test whether or not a number entered by the user is a prime and display the appropriate message.
Copy and paste your program into the text area below when you are done and press the Submit button.