Search:

Type: Posts; User: helloworld922

Search: Search took 0.08 seconds.

  1. Replies
    9
    Views
    1,306

    Re: How to make for loop work?

    In both sets of code it tells you how to append to a string. For String objects, the + operator is defined as appending two strings together (the += operator similarly appends and re-assigns). Note...
  2. Replies
    9
    Views
    1,306

    Re: How to make for loop work?

    message += "your message goes here";

    An alternative (if you're interested in performance, though with modern day computers and this situation this is a non-issue) is to use the StringBuilder class...
  3. Replies
    9
    Views
    1,306

    Re: How to make for loop work?

    The problem is you're re-assigning the value of message to a new string, rather than simply appending to it. This erases all the old messages.
  4. Replies
    9
    Views
    1,306

    Re: How to make for loop work?

    The formatter's picky about spaces.

    So [highlight=java] (no spaces) is the correct syntax, where-as [highlight = java] (with spaces) won't work properly.

    I'm a little unsure of what you mean by...
Results 1 to 4 of 4