exercise - simple input and output java provides rich set of classes and methods for performing input and output within program there are classes in java for doing graphical user interface designcomplete with pop-up windows and pull-down menusas well as methods for the display and input of text and numbers java also provides methods for dealing with graphical objectsimagessoundsweb pagesand mouse events (such as clicksmouse oversand draggingmoreovermany of these input and output methods can be used in either stand-alone programs or in applets unfortunatelygoing into the details on how all of the methods work for constructing sophisticated graphical user interfaces is beyond the scope of this book stillfor the sake of completenesswe describe how simple input and output can be done in java in this section simple input and output in java occurs within the java console window depending on the java environment we are usingthis window is either special pop-up window that can be used for displaying and inputting textor window used to issue commands to the operating system (such windows are referred to as shell windowsdos windowsor terminal windowssimple output methods java provides built-in static objectcalled system outthat performs output to the "standard outputdevice most operating system shells allow users to redirect standard output to files or even as input to other programsbut the default output is to the java console window the system out object is an instance of the java io printstream class this class defines methods for buffered output streammeaning that characters are put in temporary locationcalled bufferwhich is then emptied when the console window is ready to print characters specificallythe java io printstream class provides the following methods for performing simple output (we use base_type here to refer to any of the possible base types)print(object )print the object using its tostring method print(string )print the string print(base_type )print the base type value println(string )print the string sfollowed by the newline character