For this project I'm restricted to Java 2. I'd like to find something that's a cross between a HashMap and a FIFO buffer. I want to store objects by name, but when it gets to a certain size I want to automatically drop the oldest one in the queue.
I am trying to do exercise 17 on page 546 of Bruce Eckel's Thinking In Java (4th edition): "Write a program that reads a Java source-code file (you provide the file name on the command line) and displays all the comments."
Is this the best we to conditionally do something if str is NOT equal to one, two, three, or four, AND mystr is NOT equal to X? I can't seem to find anything like a str.unequal. I want the if block to execute if str equals "seven" and mystr equals "Y"