Pat Steele wrote:
Is this the correct way to put it in main class and why do I have an error?
look at line 4. On the left side of the equals, you are declaring a String variable. It can point to a single String.
On the RIGHT side, you have a String array.
You cannot have a String point to a String Array.
I would suggest you stop. Step away from the computer, and think about what you are trying to do. You seem to be trying random stuff, and just HOPING it works. That is really not a good way to write a program. Given enough time (i.e approaching infinity) you will get it to work, but I'm betting you don't have that long.
so...shut off you computer. write down in English what you want to have happen. Don't use "java" words, but plain old words you learned in grade school. In fact, pretend you are telling a 10 year old child what they need to do.
only when you have that done should you write a single line of Java.