Jump to content

Need Some Help and Improvements


piamia

Recommended Posts

A variable followed by ++ denotes an incrementation in most languages including Java. The opposite of incrementation is decrementation (--).

 

As a side note, if you ever plan to write code, do it in english. In 7 years I've never written code in my native language and I'm not going to.

Link to comment
Share on other sites

A variable followed by ++ denotes an incrementation in most languages including Java. The opposite of incrementation is decrementation (--).

 

As a side note, if you ever plan to write code, do it in english. In 7 years I've never written code in my native language and I'm not going to.

I tried doing that once lol, my teacher told me to write in Swedish so she could understand blink.png

It wouldn't really surprise me if she accused me of copying the code either, if it would of been in English 

Link to comment
Share on other sites

I tried doing that once lol, my teacher told me to write in Swedish so she could understand blink.png

It wouldn't really surprise me if she accused me of copying the code either, if it would of been in English 

Just like your teacher tells you to write in Swedish so she can understand, the rest of the world will ask you to write in English so that they can understand.

Link to comment
Share on other sites

Just like your teacher tells you to write in Swedish so she can understand, the rest of the world will ask you to write in English so that they can understand.

In this case what does cc++ do? I am aware that it increases by one.

 

EDIT: nvm figured out.

Edited by piamia
Link to comment
Share on other sites

Token only explained half of the increment stuff, you can also do "++cc".

 

The only real difference is that "cc++" returns the old value of cc, whereas "++cc" returns the incremented value.

 

And example:

int i = 5;
System.out.println(++i); // increment i, then print value (6)
// the variable i now equals 6
System.out.println(i++); // prints out value (6), then increments
//the variable i now equals 7
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...