• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String error

 
Kevin M Brown
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kevin M Brown wrote: Do I need to use nextLine()


Yes you are correct. You could have tried that.

Anyways, Welcome to Ranch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic