Is there any difference between static String valueOf(char ) and static String copyValueOf(char)? I have been reading the API description of these two String class methods and I cannot see any difference between them. Well, it is friday and I'm feeling it! -Barry
Good point. I can't see any reason for this either. Perhaps copyValueOf() was developed first, and they never go around to refactoring it away when they created the valueOf() methods? I suspect it's just an oversight that they're stuck with now for backwards compatibility.
"I'm not back." - Bill Harding, Twister
Joined: Aug 03, 2002
Thanks Jim and Ron, it's a pity Sun doesn't mark those copyValueOf methods as deprecated in this case. Cheers -Barry
Joined: Jan 30, 2000
I guess being redundant by itself isn't quite enough reason for deprecation.
subject: Difference between valueOf(char ) and copyValueOf(char)