Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3 Read one line from the data file
- 1. Add a declaration of a local variable to the end of your setup. The variable should be
- called header and should be type String.
- 2. Initialise header to the value returned from your scanner (in) when you call its
- nextLine function. The complete line of code looks like this:
- 1 header = in. nextLine ();
- 3. Add a println statement to print the value of header.
- 4. Run your program. In the console panel you should see the first line of the file which
- is the header line and not part of the data.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement