++a
increments and then uses the variable.
a++
uses and then increments the variable.
If you have
a = 1;
and you do
System.out.println(a++); //You will see 1
//Now a is 2
System.out.println(++a); //You will see 3
codaddict explains your particular snippet.
More Related Contents:
- Java: Prefix/postfix of increment/decrement operators?
- What is more efficient, i++ or ++i? [duplicate]
- Incrementor logic
- Java increment and assignment operator [duplicate]
- Is ++x more efficient than x++ in Java?
- Why does variable i not change after i=i++?
- How to construct a loop that produces a temp conversion chart
- What is x after “x = x++”?
- post increment operator java
- Post increment operator not incrementing in for loop [duplicate]
- Why doesn’t changing the pre to the post increment at the iteration part of a for loop make a difference?
- Is the pre-increment operator thread-safe?
- Why does post-increment work on wrapper classes
- ANTLR: Is there a simple example?
- Failed to resolve com.google.android.gms play-services-auth:11.4.0
- Multiple returns: Which one sets the final return value?
- Why does the toString method in java not seem to work for an array
- How to set selected item of Spinner by value, not by position?
- The following classes could not be instantiated: – android.support.v7.widget.Toolbar
- What is the breakdown for Java’s lambda syntax?
- Is there a way to lower Java heap when not in use?
- Why JScrollPane in JOptionPane not showing all its content?
- a confusion about java String literal pool and String’s concatenation
- Setting custom font
- How can I ensure in Java that the current local time is correct? [duplicate]
- How can I reload properties file in Spring 4 using annotations?
- Getting the last modified date of a file in Java
- How to show JRBeanCollectionDataSource data with help of Table component?
- How to manipulate arrays. Find the average. Beginner Java
- How to handle full period in java.time?