Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Translate to english

Reply
Thread Tools

Translate to english

 
 
Tavish Muldoon
Guest
Posts: n/a
 
      08-23-2004
Hello,

Would someone be able to explain what the resultant would be of this statement:

int i = 2;
int j = 3;
int k = 4;

i += j += ++k;


Would some one be able to translate this into 'english'?

I see it as 'add 1 to k' which now equals 5
then 'add 5 to j' which is 3+5=8
then 'add 2' which is the value of i
for a grand total of 10.

Is this correct?

Thanks,

Tmuld.
 
Reply With Quote
 
 
 
 
Elie De Brauwer
Guest
Posts: n/a
 
      08-23-2004
On Mon, 23 Aug 2004 07:18:44 -0700, Tavish Muldoon wrote:

> Hello,
>
> Would someone be able to explain what the resultant would be of this statement:
>
> int i = 2;
> int j = 3;
> int k = 4;
>
> i += j += ++k;
>
>
> Would some one be able to translate this into 'english'?
>
> I see it as 'add 1 to k' which now equals 5
> then 'add 5 to j' which is 3+5=8
> then 'add 2' which is the value of i
> for a grand total of 10.
>
> Is this correct?
>


k=k+1;
// k = 5
j= j + k;
// j = 8
i= i + k;
// i = 10;

You assumption was correct, but the easiest way to be sure is by coding it.

my 2 cents

--
Elie De Brauwer
http://www.de-brauwer.be

No animals were hurt and no microsoft products were used during the
creation of this e-mail

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to translate popup message from German to English # Fred # Computer Support 2 09-06-2006 02:56 AM
Help translate German into English Rajinder Nijjhar Computer Support 10 05-22-2006 10:12 AM
English/English DLL =?Utf-8?B?UmFlZCBTYXdhbGhh?= ASP .Net 2 10-16-2005 10:32 AM
Re: Can ASP.NET translate from English to another language? Aaron Lewis ASP .Net 0 07-23-2003 09:32 PM
RE: Can ASP.NET translate from English to another language? Tian Min Huang ASP .Net 0 07-23-2003 02:24 PM



Advertisments