This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes String error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String error" Watch "String error" New topic
Author

String error

Kevin M Brown
Greenhorn

Joined: Nov 06, 2012
Posts: 3
Hi all, just having a small problem I'm sure you pros instantly know the answer to.

Here's the code



When I enter in my whole name - "Kevin Brown" - it prints my last one only, or an error. Do I need to use nextLine() or something?
I'm using BlueJ.
Thanks,

-Kevin
Rameshwar Soni
Ranch Hand

Joined: Feb 03, 2011
Posts: 247
Kevin M Brown wrote: Do I need to use nextLine()


Yes you are correct. You could have tried that.

Anyways, Welcome to Ranch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String error
 
Similar Threads
Inheritance Problem
Weird errors
Scanner help: What on earth is wrong?
try...catch blocks giving <identifier> expected error
name character recall help