Difference between "concat" and "+"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lotus18
    Contributor
    • Nov 2007
    • 865

    Difference between "concat" and "+"

    Hello Java World

    Can anyone tell me what's the difference between the

    1. concat and +?
    2. append and insert?



    Rey Sean
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Closely study the following little example and read the API documentation:

    [code=java]
    String ss= "abc";
    System.out.prin tln("abc" == ss+"");
    System.out.prin tln("abc" == ss.concat(""));
    [/code]

    kind regards,

    Jos

    Comment

    Working...