This site requires JavaScript, please enable it in your browser!
Greenfoot back
smcgee
smcgee wrote ...

2016/6/20

x and y values

smcgee smcgee

2016/6/20

#
private void anotherExample(int x, int y)
{
value=2*x+2*y;
}
Can you please explain what this method does?
danpost danpost

2016/6/20

#
smcgee wrote...
< Code Omitted > Can you please explain what this method does?
It sets the value of the 'value' field to twice the sum of the given values 'x' and 'y'. There is not much else that can be said about this one.
smcgee smcgee

2016/6/20

#
Outstanding - thank you.
You need to login to post a reply.