Strings are immutable in Java and cannot be changed. The toUpperCase method returns a different String than it is passed. The String it returns is upper case. The original stays unchanged.
On Jan 28, 2:49 am, android beginner <[email protected]> wrote: > Hi, > > The following is the code snippet. It is observed that after calling the > toUpperCase routine, 'f' is not converted to "F". Can anyone let me know why > this behaviour?? > > String str = "f"; > > str.toUpperCase(Locale.*ENGLISH*); > > Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

