This site requires JavaScript, please enable it in your browser!
Greenfoot_back
Back to discussions
No_avatar_thumb
MakerOfGames wrote ...

2012/9/9

How fast do the numbers add in x=x+1

No_avatar MakerOfGames

2012/9/9

How much numbers per second is added to x when its x=x+1?
Alucard_profile_thumb erdelf

2012/9/9

well, when do you call this?
Gevater_tod Gevater_Tod4711

2012/9/9

Do you mean how long it will take because you need the value in the next line like this:
then the answer is simple: Java will not execute the next line while the line before is not processed. If you mean how much runtime it will take: It's just a addition and it'll not take much runtime. But better use this:
in this cases Java only needs to call the value x one time, not two times like in your case
You need to login to post a reply