Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Breaking up lines of code  RSS feed

 
Mark Miller
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pretty dumb question and I have looked in the book that I am working out and can't find out how to do this.
Every time that I break a line of code so that it's not going off into neverland off the right side of screen I get an error message.
Example:
String myString = "your text goes here END OF LINE
and this is the rest of the string";
Thanks in advance!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

By the way - you'll get in trouble for your name.
 
Mark Miller
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,
I knew that it was something really simple.
 
Hentay Duke
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add something. That was an example for a string. You can break up a line that's not a string with no problem. For example

 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul's right, but just to make it official....

EZ DoesIt:

Welcome to JavaRanch! While we are happy to help people, the one rule that we have 'round these parts (other than "Be Nice") is our Naming Policy. Please read it and then change your display name to somethign that conforms. We are looking for a real-sounding first and last name.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!