![]() |
Streams of primitive elements
Write out a series of primtive elements and read them back in, checking for consistency. Details of input and output streams are covered in the course notes. Work LocationPerform all work for this magercise in VisualAge project MageLang Magercises, package magercises.Streams of Primitive Elements. If this project does not appear in your Workspace add it from the repository (if it exists there) or create a new project using this name. Tasks
Perform the following tasks:
int: 34 String: "hello" double: 3.14159 byte: 2 Close the file and read the values back in. Use DataInputStream. Verify that the values read in are the same that were written. Print "ok" or "not ok" for each consistency check.
|
Copyright © 1996-1997 MageLang Institute. All Rights Reserved. |