I am trying to use the print function of PrintWriter. When I use this method, my program continues to run but all my other functions doesn't work.
public void printVertices(PrintWriter os) {
for(int i = 0; i < vert.size(); i++) {
os.print(vert.get(i) + " ");
}
os.close();
}
See Question&Answers more detail:os