create account

Java, Android software development [Part-28] :: Let's know details about if, if else, if-else-if ladder and switch (Part 1) by amirul

View this thread on: hive.blogpeakd.comecency.com
· @amirul · (edited)
$1.76
Java, Android software development [Part-28] :: Let's know details about if, if else, if-else-if ladder and switch (Part 1)
So let's first go to Java if go to statemenT. Actually these are similar to C / C ++.
If the statistic is a type of statistic which will only work if the condition is true. Otherwise, if the work is outside the condition without any other work, then it will do the term then the program will terminate. If the condition is true, we will print the print out of the printed book, and otherwise the program will terminate without printing anything. Let's take a look at our syntax ...

1.if (condition) {
2.// code to be executed
3.}
I have said earlier that 1,2,3 are not any part of the line number code.

Let's take a look at the flowchart
![](https://steemitimages.com/DQmVvwRrw5Toj51M3YCXmVxGuhnHjqs63GAmU2A3VTifjvs/image.png)
I noticed a song by looking at the flowchart ... do not fall in the glow of the eye ... what is the look of your face ... stay tuned to the next tweet from youtube. I hope you understand the image. If you do not understand, I will explain that there is no problem.

Let's go to a little programming ...
1.public class IfExample {
2.public static void main (string [] args) {
    3.int age = 20;
    4.if (age> 18) {
      5.  System.out.print ("Age is greater than 18");
    6.}
7.}
8.}
Hope everyone can understand that the condition given in this program is that if the age variable is more than 18, then age is greater than 18. And if it is less then the program will terminate without printing anything.

Let's know about Java IF-else Statement
This is a type of condition that will show a different result if it is true and if it is false, then it will look different. This means that if you use this if-else statement, you will be able to see what the condition is and if you lie, then set it to show.

Take a look at the syntax ...
1. if (condition) {
2. // code if condition is true
3. }
4. else {
5. // code if condition is false
6. }

![](https://steemitimages.com/DQmdxtTcss2iFda2Nqru2A4eycyfS4KGgD1aiBCas464E6F/image.png)

Let's look at the praktakali by a little program ...
1. public class IfElseExample {
2. public static void main (string [] args) {
3. int number = 13;
4. if (number% 2 == 0) {
5. System.out.println ("even number");
6.   }
7. else {
 8. System.out.println ("odd number");
 9.  }
10.}
11.}
This program is written to find out if any number is welded or not. The condition here is given is that if a number is divided by 2 and its relation is 0. Then emphasize it, and if not, then wijor. That is, if the value of the number is divided by 2, then if the fraction is 0, then a similar result is also false and another type of output (odd number).
👍  , , , , , , , , , , , , , , , , , , , ,
properties (23)
authoramirul
permlinkjava-android-software-development-part-28-let-s-know-details-about-if-if-else-if-else-if-ladder-and-switch-part-1
categorytechnology
json_metadata{"tags":["technology","fiction","science","programming","tech"],"image":["https://steemitimages.com/DQmVvwRrw5Toj51M3YCXmVxGuhnHjqs63GAmU2A3VTifjvs/image.png","https://steemitimages.com/DQmdxtTcss2iFda2Nqru2A4eycyfS4KGgD1aiBCas464E6F/image.png"],"app":"steemit/0.1","format":"markdown"}
created2017-09-11 16:48:00
last_update2017-09-18 11:36:06
depth0
children1
last_payout2017-09-18 16:48:00
cashout_time1969-12-31 23:59:59
total_payout_value1.355 HBD
curator_payout_value0.406 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,606
author_reputation10,317,172,021,430
root_title"Java, Android software development [Part-28] :: Let's know details about if, if else, if-else-if ladder and switch (Part 1)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,573,512
net_rshares622,668,073,412
author_curate_reward""
vote details (21)
@minnowpond ·
This post recieved an upvote from minnowpond. If you would like to recieve upvotes from minnowpond on all your posts, simply FOLLOW @minnowpond
properties (22)
authorminnowpond
permlinkre-java-android-software-development-part-28-let-s-know-details-about-if-if-else-if-else-if-ladder-and-switch-part-1-20170911t165843
categorytechnology
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-09-11 16:58:45
last_update2017-09-11 16:58:45
depth1
children0
last_payout2017-09-18 16:58:45
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_length143
author_reputation13,239,048,956,578
root_title"Java, Android software development [Part-28] :: Let's know details about if, if else, if-else-if ladder and switch (Part 1)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,574,423
net_rshares0