create account

BASIC CONCEPT ON INCREMENT ON JAVA by leoumesh

View this thread on: hive.blogpeakd.comecency.com
· @leoumesh ·
$2.46
BASIC CONCEPT ON INCREMENT ON JAVA
```
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. 

![Screenshot_4.png](https://images.hive.blog/DQmcwAPA5s1mqnXnE4d4VtVrkK9vDgBSEtYfgDf8AZdDaGZ/Screenshot_4.png)

In the pre increment operation, 1 is added before printing the value of the variable. So it prints the value 11.

![Screenshot_2.png](https://images.hive.blog/DQmQ8Q1U1jKD96oZ2CpBLwvRGYEBUXhDUmVKPHKzaLMFZuq/Screenshot_2.png)
👍  , , , , , , , , , , , , , , , , , , ,
properties (23)
authorleoumesh
permlinkbasic-concept-on-increment-on-java
categoryhive-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"}
created2020-06-23 21:45:18
last_update2020-06-23 21:45:18
depth0
children2
last_payout2020-06-30 21:45:18
cashout_time1969-12-31 23:59:59
total_payout_value1.354 HBD
curator_payout_value1.105 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length992
author_reputation212,340,493,251,438
root_title"BASIC CONCEPT ON INCREMENT ON JAVA"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,140,092
net_rshares8,172,986,248,166
author_curate_reward""
vote details (20)
@gitplait-mod1 ·
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)
properties (22)
authorgitplait-mod1
permlinkqcfz0p
categoryhive-148441
json_metadata{"links":["https://hive.blog/@gitplait","https://hive.blog/trending/hive-103590","https://discord.com/invite/CWCj3rw"],"app":"hiveblog/0.1"}
created2020-06-24 17:53:18
last_update2020-06-24 17:53:18
depth1
children1
last_payout2020-07-01 17:53:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length485
author_reputation64,455,719,431
root_title"BASIC CONCEPT ON INCREMENT ON JAVA"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,155,686
net_rshares0
@leoumesh ·
Thanks for your comment and support. I appreciate that.
properties (22)
authorleoumesh
permlinkqcg0bx
categoryhive-148441
json_metadata{"app":"hiveblog/0.1"}
created2020-06-24 18:21:36
last_update2020-06-24 18:21:36
depth2
children0
last_payout2020-07-01 18:21:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length55
author_reputation212,340,493,251,438
root_title"BASIC CONCEPT ON INCREMENT ON JAVA"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,156,111
net_rshares0