Ok, heres the problem. I need to have the user enter in their name in the format "last name, first name". I must check the data to ensure that two words were typed, along with a comma and then a space inbetween them. How do I go about doing this?
JOptionPane is your friend. Look in the Java docs for information on how to use it. Then, you can use any of several String methods (substring(), charAt(), indexOf()) depending on how you handle it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.