Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #19361
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2012-10-15 09:15 -0700 |
| References | <81d2cb8c-292b-4efd-9a42-ac8ef0f86d0e@googlegroups.com> <sf8n78p52qmui6plhnm76ej10n83nvp967@4ax.com> |
| Message-ID | <da605771-27d3-4a7d-84fa-5628b4ad21d6@googlegroups.com> (permalink) |
| Subject | Re: boolean statement |
| From | Lew <lewbloch@gmail.com> |
Roedy Green wrote:
> K wrote, quoted or indirectly quoted someone who said :
>> public class boolean1 {
>>
>> public static void main(String[] args) {
>> int gumballs;
>> int kids;
>> int gumballsPerKid;
>> boolean eachKidGetsTen;
>
> Classes should start with a capital letter. See
> http://mindprod.com/jgloss/codingconventions.html
The normative document is the one on the Oracle site.
> eachKidGetsTen needs to be initialised.
Two things wrong with that advice. First, as written the program does not
require that the variable be initialized. Second, it is initialized in the
program the OP posted:
>> eachKidGetsTen = gumballsPerKid >= 10;
In the strict sense, it is not initialized but assigned here, but I take the
liberty of assuming you didn't mean it in the strict sense.
--
Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
boolean statement K <kalezwe@gmail.com> - 2012-10-14 17:44 -0700
Re: boolean statement glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-10-15 00:57 +0000
Re: boolean statement K <kalezwe@gmail.com> - 2012-10-14 18:25 -0700
Re: boolean statement Lew <lewbloch@gmail.com> - 2012-10-14 21:34 -0700
Re: boolean statement Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-10-15 06:54 +0000
Re: boolean statement Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-14 21:04 -0400
Re: boolean statement Gene Wirchenko <genew@ocis.net> - 2012-10-14 18:52 -0700
Re: boolean statement K <kalezwe@gmail.com> - 2012-10-14 19:55 -0700
Re: boolean statement Gene Wirchenko <genew@ocis.net> - 2012-10-14 20:10 -0700
Re: boolean statement Jeff Higgins <jeff@invalid.invalid> - 2012-10-15 08:20 -0400
Re: boolean statement Lew <lewbloch@gmail.com> - 2012-10-15 09:15 -0700
Re: boolean statement Roedy Green <see_website@mindprod.com.invalid> - 2012-10-14 22:41 -0700
Re: boolean statement Lew <lewbloch@gmail.com> - 2012-10-15 09:15 -0700
Re: boolean statement Robert Klemme <shortcutter@googlemail.com> - 2012-10-16 01:10 -0700
csiph-web