Today I started by covering File input and output in Java.
After looking at some of your labs I realized some of you didn't know how to create input/output streams in Java. Here are some example of how to do input/output streams in Java.
Class Code
The First program uses the Scanner class to input data from a text file.
For file output a long time ago I wrote my own Scanner type class for outputting to files. I call it FileOut. I've used it in several programs now.
- FileOut.java Writing to a file.
- My program to show threads and writing to a file from two different threads.
Graphs
Here a continuation of the Graph lectures, shortest path stuff. Chapter 9 in the book.
Graphs
Kruskal's and Primm's algorithms