Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
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, 2467👍, 0💬
Popular Posts:
what are the advantages of hosting WCF Services in IIS as compared to self hosting? There are two ma...
How To Remove the Top White Space of Your Web Page? - CSS Tutorials - Introduction To CSS Basics The...
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
Give me the example of SRS and FRS SRS :- Software Requirement Specification BRS :- Basic Requiremen...
Can Sub Procedure/Function Be Called Recursively? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...