Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
Can one create a method which gets a String and modifies it?
Can one create a method which gets a String and modifies it?
✍: Guest
No. In Java, Strings are constant or immutable; their values cannot be changed after they are created, but they can be shared. Once you change a string, you actually create a new object. For example:
String s = "abc"; //create a new String object representing "abc"
s = s.toUpperCase(); //create another object representing "ABC"
2012-08-24, 2059👍, 0💬
Popular Posts:
How To Specify Two Background Images on a Page? - CSS Tutorials - Page Layout and Background Image D...
How do we create DCOM object in VB6? Using the CreateObject method you can create a DCOM object. You...
Can you explain duplex contracts in WCF? In duplex contracts when client initiates an operation the ...
How can we suppress a finalize method? GC.SuppressFinalize ()
What Happens If One Row Has Missing Columns? - XHTML 1.0 Tutorials - Understanding Tables and Table ...