JavaDeploy
SiteMap
Java Certification
Java Beans
Java-OO Concepts
Java Input/Output
« Prev
Java Basics
System Object Model
Interfaces Packages
Describe Java Package
Importing Packages
Access Control
Interface Role
Reclaiming Memory
Garbage Collection
Forcing GarbageCollection
Project Access Control
OOA Concepts
Java Exceptions
Exceptions - Quiz
Catching Exceptions-Quiz
Finally-Keyword -Quiz
Throwing Exceptions - Quiz.
Catching Exceptions Baseball
Common Java Exceptions
Java Multitasking
Using Join for Threads
Starting JavaThread - Quiz
Coordinating Java Threads - Quiz
Thread States -Quiz
Intro Java Input/Output
Java Io Package
Java System.in Read Input
Data Input Stream
File Class To Access Files
Save Restore Draw Applet Project
Java Class Input Output Review
Java Stream Programming Conclusion
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.