Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37735
| Path | csiph.com!news.swapon.de!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Kiwi User <martin@mydomain.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Please help |
| Date | Thu, 7 Dec 2017 21:48:17 +0000 (UTC) |
| Organization | albasani.net |
| Lines | 23 |
| Message-ID | <p0ccv1$eht$1@news.albasani.net> (permalink) |
| References | <4edadd79-efc8-476a-8d38-36887755b1fa@googlegroups.com> <7d136305-b0dd-4ade-98d4-89db7106955d@googlegroups.com> <d786c841-f747-4848-971d-4c222ef5d834@googlegroups.com> <93e9bca8-c0e8-4a12-bb30-9f5548f611c3@googlegroups.com> <200bfada-8168-4bf1-88de-8cb9016aec1a@googlegroups.com> <367d1efe-674a-4e85-9887-816ebd57affe@googlegroups.com> <p0bvri$mki$2@news.albasani.net> <4cd638e1-3341-411e-a1f5-d27b121ca363@googlegroups.com> <p0cbf2$guu$1@news.albasani.net> <e4b3fa88-4f24-444c-9673-61a759d9ff85@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.albasani.net G0YxaaH7k+dxzZJt5WDgee53zrVrg7sndd3ZJA20ZB5SUpGPPan1bvCDN5W+hsJBhRF9cRk8+mSPcX7UPIFw/A== |
| NNTP-Posting-Date | Thu, 7 Dec 2017 21:48:17 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="dBp0hx0UiDgTPALRBn1IuFTIGxcQfFPcDBL4TjSMQ5JkApmsvTNmHQXo6Olo/n6xXJ0vfcDfczHO0VepYX53nWwjjOBPcXvvz8WKSfr+p4qMjMao+McUPvuaTy7URjJV"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Pan/0.142 (He slipped to Sam a double gin; 01b5bf4 git.gnome.org/pan2) |
| Cancel-Lock | sha1:jPsqrRkb0Oj5ELyErhkdk3fZTxI= |
| Xref | csiph.com comp.lang.java.programmer:37735 |
Show key headers only | View raw
On Thu, 07 Dec 2017 13:32:49 -0800, Eric Douglas wrote:
> So it does. I was thinking that's one of the automatic conversions.
> Apparently String and int are only automatically compatible if you were
> to do something like this.
>
> this.accountNum = X00000 + "";
>
Yep. I do that often enough when building diagnostic println()
parameters, though almost never in assignment statements.
Generally I prefer the neatness of String.format()
> (though the correct answer to this homework question is still:)
> this.accountNum = "X00000";
>
Yes, total agreement here. Beginners learning to rely on automatic
conversion is likely to bite them sooner rather than later.
--
Martin | martin at
Gregorie | gregorie
| dot org
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Please help rustboy86@gmail.com - 2017-12-07 06:02 -0800
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 07:10 -0800
Re: Please help rustboy86@gmail.com - 2017-12-07 07:33 -0800
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 08:22 -0800
Re: Please help rustboy86@gmail.com - 2017-12-07 08:31 -0800
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 08:54 -0800
Re: Please help rustboy86@gmail.com - 2017-12-07 09:29 -0800
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 10:11 -0800
Re: Please help Kiwi User <martin@mydomain.invalid> - 2017-12-07 18:04 +0000
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 10:14 -0800
Re: Please help rustboy86@gmail.com - 2017-12-07 10:36 -0800
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 10:44 -0800
Re: Please help rustboy86@gmail.com - 2017-12-07 11:04 -0800
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 13:35 -0800
Re: Please help Kiwi User <martin@mydomain.invalid> - 2017-12-07 21:22 +0000
Re: Please help Eric Douglas <e.d.programmer@gmail.com> - 2017-12-07 13:32 -0800
Re: Please help Kiwi User <martin@mydomain.invalid> - 2017-12-07 21:48 +0000
csiph-web