• Post Reply Bookmark Topic Watch Topic
  • New Topic

What does " " mean?  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dont know in     System.out.println(beerNum + " " + word + " of beer on the wall");            what does   " " mean? i seems " "  has conflicts with word since word represents "bottles". why not just    System.out.println(beerNum + word + " of beer on the wall");?



 
Ranch Hand
Posts: 448
3
Android Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  what does   " " mean?

In System.out.println, the "" indicates as a space.
 
Marshal
Posts: 56600
172
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please use the code button; I have edited your post with it and doesn't it look better
John Joe is right. If you don't add spaces, yourprintoutwillruntogetherasoneword.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few minutes ago, I wrote:yourprintoutwillruntogetherasoneword.
Read that as
your printout will run together as one w‍ord.
 
John Joe
Ranch Hand
Posts: 448
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When creating a post, please name the title to be more descriptive than " help!!! "

[A moderator has edited the subject]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java
" "  this symbol indicates the spaces
 
Greenhorn
Posts: 3
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
" " Will put spaces in your output. Without them your output will be all clumped together.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!