This content has been marked as final. Show 2 replies
1005698 wrote:But you shouldn't be guessing, you should be knowing. You say you want to SEPARATE a String. So what is stopping you from typing "java separate string" into Google? You get some interesting results I can tell you.
If i had to guess, it would involve putting a ++ somewhere.
When I was learning and I needed to do something very specific my first stop was always the javadocs. In this case you want to separate (or "split") a String, so a logical place to look would be the javadoc for the String class. Easy to get to, just type "java 7 String" into google and off you go.
And then its a question of scanning the available method names to see one that might fit your needs. Don't understand how to properly use it? Google it! The whole world uses Java, you have a rich history of examples and articles at your disposal that I certainly did not have when I started out. Use it, please.