AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > Support > Tech Support


Thread Tools
Old 2012-01-19, 13:42   Link #1
Witch of Uncertainty
Senior Member
Join Date: Jun 2010
Programming (Java)

Sorry if this is completely misplaced, but I'm having a LOT of trouble over a task we got in Java, and I'm wondering whether anyone here oculd help me out?

So basically, my brain is crying over this:
Explain what results you get, and why you get them:

Spoiler for :|:

Can anyone help? I would reaaallly appreciate it. This subject is driving me insane!
Witch of Uncertainty is offline   Reply With Quote
Old 2012-01-19, 15:53   Link #2
Paranoid Android
Underweight Food Hoarder
Join Date: Nov 2011
Location: Kitch-Water and T.O., Canada
Age: 27
Send a message via MSN to Paranoid Android
What is '++x'
in z=A(++x,B(x,y)); ? I've never seen such an value being passed as an argument. I've only used it as a built in increment method.

My current workstation doens't have java so i just just did this on paper:

-4 (if I ignore that ++ argument)
Paranoid Android is offline   Reply With Quote
Old 2012-01-19, 16:09   Link #3
Exitus Acta Probat
*Graphic Designer
Join Date: Jul 2006
Location: Permanent retirement from raws-hunting
Age: 32
Did it first by hand, got confused with all the reused variables then ended up using Eclipse as assistant, but still had to tear everything apart.

Anyway, here's how it's executed:

And the ++ before the variable indicates a preincrementation.

The difference between ++var and var++ is this:
<< -- Click to enter my GFX thread.

-- Permanently retired from the raw-hunting business --

Last edited by Renegade334; 2012-01-19 at 16:26.
Renegade334 is offline   Reply With Quote
Old 2012-01-19, 21:08   Link #4
Senior Member
Join Date: Jul 2010
tl;dr. Even though I've not programmed in years, I worked them out mentally, and my answer is the same as Renegade: 1, 6, 10
larethian is offline   Reply With Quote
Old 2012-01-20, 05:03   Link #5
Witch of Uncertainty
Senior Member
Join Date: Jun 2010
Thank you SO much
This is really helpful. I managed to get my head around it (FINALLY) now!

Again, thanks. <3
Witch of Uncertainty is offline   Reply With Quote

java, programming

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

Forum Jump

All times are GMT -5. The time now is 12:57.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
We use Silk.