Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31853
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: elementary loops |
| Date | 2015-06-25 14:57 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <mmhit6$jkj$1@dont-email.me> (permalink) |
| References | <loops-20150622181350@ram.dialup.fu-berlin.de> <MPG.2ff664b393c1c2c69896a3@news.aioe.org> |
On 6/25/2015 2:20 PM, Brixomatic wrote:
> In article <loops-20150622181350@ram.dialup.fu-berlin.de>, Stefan Ram
> (ram@zedat.fu-berlin.de) says...
>>
>> public class Main
>> { public static void main( final java.lang.String[] args )
>> { short i = -1;
>> int j = -1;
>> for( int k = 0; k < 65; ++k ){ i >>>= 1; j <<= 32; }
>> java.lang.System.out.println( i );
>> java.lang.System.out.println( j ); }}
>>
>> I hope you can all predict what this prints and explain why.
>
> Ah, I recognize this..
> The j should stay -1.
Halfway there. See anything else?
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: elementary loops Brixomatic <brixomatic@yahoo.com> - 2015-06-25 20:20 +0200 Re: elementary loops Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-06-25 14:57 -0400
csiph-web