Re: Incerting space in concatinated string

From: mhandis (none_at_none.none)
Date: 10/18/03


Date: Sat, 18 Oct 2003 11:31:05 -0700


message = string1.concat(" ").concat(string2);

Or even better:

message = string1 + " " + string2;

Buster wrote:
> Hi, im a programming newbie and am having a bit of a problem with a practice
> program im working on.
>
> I have declared 2 strings in my program which allow the user to enter the
> string value on execution through 2 dialog boxes.
>
> The problem in having is when i concatenate the 2 stings using the concat
> method e.g. message = string1.concat(string2);
>
> when i output message it will output something like HelloWorld. Does anyone
> have any suggestions on how to add a space between the 2 strings
>
>
>
>
>
>



Relevant Pages

  • Re: Incerting space in concatinated string
    ... im a programming newbie and am having a bit of a problem with a practice ... > I have declared 2 strings in my program which allow the user to enter the ... > The problem in having is when i concatenate the 2 stings using the concat ... > when i output message it will output something like HelloWorld. ...
    (comp.lang.java)
  • Re: Incerting space in concatinated string
    ... im a programming newbie and am having a bit of a problem with a practice ... > I have declared 2 strings in my program which allow the user to enter the ... > The problem in having is when i concatenate the 2 stings using the concat ... > when i output message it will output something like HelloWorld. ...
    (comp.lang.java.programmer)
  • Incerting space in concatinated string
    ... im a programming newbie and am having a bit of a problem with a practice ... I have declared 2 strings in my program which allow the user to enter the ... The problem in having is when i concatenate the 2 stings using the concat ... when i output message it will output something like HelloWorld. ...
    (comp.lang.java.programmer)
  • Incerting space in concatinated string
    ... im a programming newbie and am having a bit of a problem with a practice ... I have declared 2 strings in my program which allow the user to enter the ... The problem in having is when i concatenate the 2 stings using the concat ... when i output message it will output something like HelloWorld. ...
    (comp.lang.java.help)
  • Incerting space in concatinated string
    ... im a programming newbie and am having a bit of a problem with a practice ... I have declared 2 strings in my program which allow the user to enter the ... The problem in having is when i concatenate the 2 stings using the concat ... when i output message it will output something like HelloWorld. ...
    (comp.lang.java)