why concat() is not working here? , java
Posted
by soma sekhar
on Stack Overflow
See other posts from Stack Overflow
or by soma sekhar
Published on 2010-05-12T12:39:13Z
Indexed on
2010/05/12
12:44 UTC
Read the original article
Hit count: 224
Consider the code below,
String s = "TEST";
String s2 = s.trim();
s.concat("ING");
System.out.println("S = "+s);
System.out.println("S2 = "+s2);
Output obtained :
S = TEST
S2 = TEST
BUILD SUCCESSFUL (total time: 0 seconds)
Why "ING" is not concatenated?
© Stack Overflow or respective owner