Java - Printing a message when data exceeds limit?
问题 I've got my code working, it's not pretty but it doe's the job :) Now I want to write a piece of code that stops the data from being loaded if there is 19 or more pieces of data in the text file and then display a message saying Invalid input for example. I'm not sure how to do this so any help would be appreciated. package stackandqueue; import java.util.*; import java.util.Stack; import java.util.Queue; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io