Java Programming Tutorial – 19 – else if Statement

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

32 responses to “Java Programming Tutorial – 19 – else if Statement”

  1. Hamza Rana Avatar

    Easy peasy.
    In Python, Else If is known as elif.

  2. bharadwaj25 Avatar

    Simply Awesome, thank you !!!

  3. Muhammad Taymoor Avatar

    it only works in descending order. if we give all our if statement according to descending order. why?

  4. Saurabh Kumar Avatar

    who else is watching in 2017
    ??

  5. Totally Anonymous Avatar

    why do you have to use else if…could you just use if if if if, else?

  6. riyadh hossain Avatar

    what is the difference between nested loops and else if?

  7. TNTSquid Avatar

    hmm….. so , why don't use a switch statement as you mentioned in the previous episodes?

  8. Ivan Limari Avatar

    is switch/case thing even used when this is available?

  9. atharv patil Avatar

    {where are the brackets}

  10. Sarah C Avatar

    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'?

  11. steliosjaj Avatar

    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));
    }
    }
    }
    }

  12. Mitchell Shirley Avatar

    you're a lifesaver homedog!

    Might not fail on Wednesday cause of this Woo!

  13. Clarence Chung Avatar

    … where is the {} bracket in this codes?????????????

  14. Donald.V Thomas Avatar

    how come you didn't need the curly brackets this time?

  15. Eric Kamminga Avatar

    So basically else if is similar to a switch statement

  16. Ninja of Turkey Avatar

    It keeps saying cannot find symbol when I use the if statement can some please help? I would really appreciate it.

  17. Flore Loriz Avatar

    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!!!

  18. anarki777 Avatar

    Your lack of curly braces made me dizzy.

  19. David Herfel Avatar

    What do i do if i want to do if(50<age<70);

  20. iTrusty Avatar

    Love these old tuts

  21. Amin A Avatar

    it is more like switch statement. anyone can tell me any difference between these two statement?

  22. priyanka sharma Avatar

    you can type sysout and just press ctrl+space ,instead of typing system.out.println();.

  23. Devin M Avatar

    starts any video on this playlist
    "sup guys its bucky"

  24. Levi Titan Avatar

    How is this different from the switch case?

  25. Jorge Cardona Avatar

    Why you don't use ctrl +c and ctrl+v ??? It drives me crazy that you don't use them.

  26. Arnold Deguzman Avatar

    It's like a switch statement.

  27. Aaron Wang Avatar

    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

  28. poopdude444 Avatar

    so what is the difference between else if, and nested ifs?

  29. Official IamUya Avatar

    the first else is giving me error in the first else if

  30. kobe marchal Avatar

    Doesn't there needs to be a break(); ?

Leave a Reply

Your email address will not be published. Required fields are marked *