why strings in java when we can have array of characeter or viceversa?
why strings in java when we can have array of characeter or viceversa?
Collapse
X
-
Tags: None
-
Hal p
In Java Strings are immutable, so they technically are a fixed size. They are far more convenient and easier to use than Char[] though. Say you have String s = "hi". You can call any function on s, but as long as you don't break the reference to s you will always be able to see that s = "hi".Comment
Comment