Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36227
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Type conversions with the empty string |
| Date | Mon, 30 Jan 2017 12:25:34 -0600 |
| Organization | A noiseless patient Spider |
| Lines | 28 |
| Message-ID | <o6o0c5$8f7$1@dont-email.me> (permalink) |
| References | <emtpy-string-20170128143107@ram.dialup.fu-berlin.de> <o6ntbt$qko$1@dont-email.me> <toString-20170130190755@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Mon, 30 Jan 2017 18:24:08 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="c294840f8e49434e23fb5d763a96832a"; logging-data="8679"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MN44MaVavhmqitDj8bp1H" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
| In-Reply-To | <toString-20170130190755@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:KJQAcW42S6QY95Lt+DZz1gSutvc= |
| Xref | csiph.com comp.lang.java.programmer:36227 |
Show key headers only | View raw
On 1/30/2017 12:08, Stefan Ram wrote: > Knute Johnson <nospam@rabbitbrush.frazmtn.com> writes: >> On 1/28/2017 07:43, Stefan Ram wrote: >>> String.valueOf( 123 ) >> You would prefer any of those over Integer.toString(123)? > > »java.lang.String.valueOf« is the universal one-stop > solution to convert anything into a string, including > primitive values, class instances and even null! So it > does not make me think. Whenever I want to convert anthing > into a »java.lang.String« instance, I use this. I can see that. I see it as I have an int and I want to convert it to a String but your way makes sense too. > »java.lang.Integer.toString« makes me thing about the type > of »123« and what the wrapper class of that type is, and > whether it really has such a method (for example, the static > »java.lang.Boolean.toString« method is only @since 1.4, > while »java.lang.Integer.toString« is @since 1.0.) > I don't know, 1.4 started end of life over 10 years ago. I'm not too concerned about that. -- Knute Johnson
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Type conversions with the empty string Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-01-30 11:34 -0600
Re: Type conversions with the empty string Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-01-30 12:25 -0600
Re: Type conversions with the empty string Eric Douglas <e.d.programmer@gmail.com> - 2017-01-30 10:58 -0800
Re: Type conversions with the empty string Arne Vajhøj <arne@vajhoej.dk> - 2017-01-30 21:29 -0500
Re: Type conversions with the empty string Robert Klemme <shortcutter@googlemail.com> - 2017-02-01 00:01 +0100
Re: Type conversions with the empty string Arne Vajhøj <arne@vajhoej.dk> - 2017-02-13 12:50 -0500
csiph-web