• anonymous
I need help with the Second Initial of this Java Program. I will attach file.
Computer Science
  • Stacey Warren - Expert
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
  • katieb
I got my questions answered at in under 10 minutes. Go to now for free help!
  • anonymous
  • anonymous
I cannot get it to read the second initial. The way I have it now does capitalize both initials but the position keeps giving me the same one if I input for example linda ross it capitalizes L.L. instead of L.R.
  • mathmate
Well, you will have to read up about the command. It has a default delimiter of a space, " ". So it reads only the first name. You can check that by printing what you read (a good debugging tool). System.out.println(name); right after reading in the name will do. All you need to change is to use the method .nextLine() instead of .next() Later on, the code is good, except that there is a line of code that modified "name" unnecessarily. I'll let you check that.

Looking for something else?

Not the answer you are looking for? Search for more explanations.