``` public class Increment { public static void main(String[] args) { int a = 10; System.out.println(a++); System.out.println(a); /* System.out.println(++a); */ } } ``` This is a simple program based on relatively simple concept and simple operation. Post increment means incrementing afterwards and pre increment means incrementing before. As in the ouput below you can see the program first prints value 10 that was initially assigned to it and then after 11. The reason why 11 was not printed on the first output display is that post increment takes one step further so that it will print the incremented value in the next step.  In the pre increment operation, 1 is added before printing the value of the variable. So it prints the value 11. 
author | leoumesh |
---|---|
permlink | basic-concept-on-increment-on-java |
category | hive-148441 |
json_metadata | {"tags":["hive-148441","java","coding","code","program","programming","tutorial","concept"],"image":["https://images.hive.blog/DQmcwAPA5s1mqnXnE4d4VtVrkK9vDgBSEtYfgDf8AZdDaGZ/Screenshot_4.png","https://images.hive.blog/DQmQ8Q1U1jKD96oZ2CpBLwvRGYEBUXhDUmVKPHKzaLMFZuq/Screenshot_2.png"],"app":"hiveblog/0.1","format":"markdown"} |
created | 2020-06-23 21:45:18 |
last_update | 2020-06-23 21:45:18 |
depth | 0 |
children | 2 |
last_payout | 2020-06-30 21:45:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 1.354 HBD |
curator_payout_value | 1.105 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 992 |
author_reputation | 212,340,493,251,438 |
root_title | "BASIC CONCEPT ON INCREMENT ON JAVA" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 98,140,092 |
net_rshares | 8,172,986,248,166 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tombstone | 0 | 9,423,402,270 | 0.45% | ||
onealfa | 0 | 16,351,944,746 | 0.75% | ||
mys | 0 | 3,729,234,220 | 1% | ||
whd | 0 | 1,224,922,383 | 1% | ||
themarkymark | 0 | 2,185,779,203,809 | 10% | ||
pixelfan | 0 | 11,622,659,224 | 2% | ||
buildawhale | 0 | 5,200,564,848,630 | 10% | ||
therealwolf | 0 | 466,592,453,253 | 1.5% | ||
makerhacks | 0 | 11,217,753,801 | 10% | ||
smartsteem | 0 | 204,068,701,888 | 1.5% | ||
upmyvote | 0 | 7,913,209,967 | 10% | ||
leoumesh | 0 | 37,885,962,469 | 100% | ||
ipromote | 0 | 3,090,212,164 | 10% | ||
jk6276 | 0 | 0 | 1% | ||
gorbisan | 0 | 1,222,231,801 | 0.75% | ||
laissez-faire | 0 | 46,235,643 | 100% | ||
a-non-e-moose | 0 | 3,798,112,879 | 100% | ||
epicdice | 0 | 3,708,130,361 | 0.45% | ||
femcy-willy | 0 | 3,024,144,872 | 74% | ||
peterpanpan | 0 | 1,722,883,786 | 13% |
Thanks for sharing Java increment related JAVA Tutorial. You know the art of making it easier for other user. Keep doing like this. We are looking for people like you in our platform. Your post has been curated with [@gitplait](https://hive.blog/@gitplait) community account because this is the kind of publications we like to see in our community. Join our Community on [Hive](https://hive.blog/trending/hive-103590) and Chat with us on [Discord](https://discord.com/invite/CWCj3rw)
author | gitplait-mod1 |
---|---|
permlink | qcfz0p |
category | hive-148441 |
json_metadata | {"links":["https://hive.blog/@gitplait","https://hive.blog/trending/hive-103590","https://discord.com/invite/CWCj3rw"],"app":"hiveblog/0.1"} |
created | 2020-06-24 17:53:18 |
last_update | 2020-06-24 17:53:18 |
depth | 1 |
children | 1 |
last_payout | 2020-07-01 17:53:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 485 |
author_reputation | 64,455,719,431 |
root_title | "BASIC CONCEPT ON INCREMENT ON JAVA" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 98,155,686 |
net_rshares | 0 |
Thanks for your comment and support. I appreciate that.
author | leoumesh |
---|---|
permlink | qcg0bx |
category | hive-148441 |
json_metadata | {"app":"hiveblog/0.1"} |
created | 2020-06-24 18:21:36 |
last_update | 2020-06-24 18:21:36 |
depth | 2 |
children | 0 |
last_payout | 2020-07-01 18:21:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 55 |
author_reputation | 212,340,493,251,438 |
root_title | "BASIC CONCEPT ON INCREMENT ON JAVA" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 98,156,111 |
net_rshares | 0 |