[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Java Programming Tutorial – 19 – else if Statement
by
Tags:
Comments
32 responses to “Java Programming Tutorial – 19 – else if Statement”
-
Easy peasy.
In Python, Else If is known as elif. -
Simply Awesome, thank you !!!
-
it only works in descending order. if we give all our if statement according to descending order. why?
-
who else is watching in 2017
?? -
why do you have to use else if…could you just use if if if if, else?
-
I'm a young buck
-
what is the difference between nested loops and else if?
-
hmm….. so , why don't use a switch statement as you mentioned in the previous episodes?
-
is switch/case thing even used when this is available?
-
{where are the brackets}
-
What would happen if your 'if' statements were in the reverse order so it looked at the >= 40 first and therefore stopped because the age was 65. Would the output show 'you are a young buck'?
-
Check This Out Guys!
import java.util.Scanner;class Apples {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("Enter A Demical Number");
double y = input.nextDouble();
if (y – Math.floor(y) <= 0.5){
System.out.println(Math.floor(y));
}else{
if (y – Math.floor(y) >= 0.5){
System.out.println(Math.ceil(y));
}
}
}
} -
you're a lifesaver homedog!
Might not fail on Wednesday cause of this Woo!
-
… where is the {} bracket in this codes?????????????
-
how come you didn't need the curly brackets this time?
-
So basically else if is similar to a switch statement
-
It keeps saying cannot find symbol when I use the if statement can some please help? I would really appreciate it.
-
Amazing tutorial. Like just think about it for a moment. How useful will a program be that tells the people that they are in their 50s… They just sometimes forget, you know. 😛 <3 Love your tutorials Bucky!!!
-
Your lack of curly braces made me dizzy.
-
What do i do if i want to do if(50<age<70);
-
Love these old tuts
-
thank you
-
it is more like switch statement. anyone can tell me any difference between these two statement?
-
you can type sysout and just press ctrl+space ,instead of typing system.out.println();.
-
starts any video on this playlist
"sup guys its bucky" -
How is this different from the switch case?
-
Why you don't use ctrl +c and ctrl+v ??? It drives me crazy that you don't use them.
-
It's like a switch statement.
-
the curly braces (to my knowledge) signifiy that Java runs that part as a group. so if its an if else, and the else part is bracketed and includes a nested if else statement, but your variable lands in the if part, then any thing in the whole else thing wont run. did that make any sense at all lol
-
so what is the difference between else if, and nested ifs?
-
the first else is giving me error in the first else if
-
Doesn't there needs to be a break(); ?
Leave a Reply