Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • increment
  • variable

Java - Increment variable by one

Increase a variable by one and store in same variable

0
559
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

Postfix increment

Variable is incremented but it's original value is used in expression it is in.

{{name}}++
java

Notes

last update: Oct. 27, 2014

0
505
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

Prefix increment

Variable is incremented and updated value is used if in expression.

++{{name}}
java

Notes

last update: Oct. 27, 2014

Advertisement

This project is hosted on DigitalOcean, try it and support us

Other language

  • Scala
  • Python
  • JavaScript
  • PHP

Random task

  • Clear apache2 error log
  • List all git stash entries
  • Get absolute url of current page
  • Function
  • Single comment
  • Blog
  • About
  • License