What is the best way to do the following? :
I'm writing a test program for a family of classes that simulate bank accounts, and I need the test class to take a series of characters from the command line (the letters 'c,' 's' and 'm', specifically, in any given order and in any amount) and it needs to create a bank account for each letter. Checking account for each 'c' present, Savings account for each 's,' and Money Market account for each 'm.' The creation of each type of account is not my problem. Mine is much simpler. What command should I use to check the letters if I put them into a String or a char array? I have that part of the main method set up as 'if' and 'else if' statements nested in a for loop. I've tried a couple different things, such as trying to compare each letter when put into a String, using charAt(). With that, I've gotten a couple different errors, and the same with trying to compare each element in a char array made up of the letters from the command line. I just need to know the right command that will compare each character, and give me a boolean value if it matches one of those three letters.