Java Tutorial For Beginners 8 – IF … ELSE Statements and Relational Operators

///Java Tutorial For Beginners 8 – IF … ELSE Statements and Relational Operators

Java Tutorial For Beginners 8 – IF … ELSE Statements and Relational Operators

FavoriteLoadingAdd to favorites

Visit for Code

Java468x60

Searches related to if statement in java
nested if statement in java
if statement in java short form
switch statement in java
if statement in java syntax
if statement in java with multiple conditions
if statement in java string
if statement in java pdf
if statement in java using stringSearches related to if java
if java syntax
if java shorthand
if java short
if java string
check if java is installed
if java and kaffe have a long standing
if java question mark
nested if java
The if-then and if-then-else Statements
Java For Complete Beginners – IF … ELSE
Java Decision Making – if…else if and switch statements

source

By |2019-06-15T19:38:20+00:00June 15th, 2019|Java Video Tutorials|44 Comments

44 Comments

  1. Shashank Maurya June 15, 2019 at 7:38 pm - Reply

    F else ………XD 4:21

  2. Morteza Rezaei June 15, 2019 at 7:38 pm - Reply

    i have question guys.
    if i want to add for example 20% to a int or subtract, how can i make it?
    for example:
    int x = 1100;
    if x <= 1100
    i want to print out (x – 20 Percent)

  3. matej grzetič June 15, 2019 at 7:38 pm - Reply

    excelent tutorials .. i think the best on you tube

  4. 农民 June 15, 2019 at 7:38 pm - Reply

    india no1

  5. HS S June 15, 2019 at 7:38 pm - Reply

    this is my first program in java but I understand everything clearly .
    thank you sir!

  6. Nadine June 15, 2019 at 7:38 pm - Reply

    how come its not working on my laptop? Im typing it exactly like that and no matter what x equals to it prints out the sentence anyway

  7. Immortal Legends June 15, 2019 at 7:38 pm - Reply

    could anyone please help me, Why this program is not working correctly?….it only goes to else statement, Even when the condition is true

    package first;
    import java.util.Scanner;
    public class MyProgram{
    public static void main(String[] args) {
    String word = "kxxwbgmn";
    System.out.print("Please enter the password : ");
    Scanner w = new Scanner(System.in);
    String A = w.nextLine();
    if (A==word) {
    System.out.println("Congratulations! You have got access");
    }
    else {
    System.out.println("Sorry! The password is incorrect");
    }
    }
    }

  8. Saptangshu Manna June 15, 2019 at 7:38 pm - Reply

    2x speed save a lot of time

  9. Smart Programming June 15, 2019 at 7:38 pm - Reply

    awesome. very nicely​ delivered the practical work, thanks

  10. EON TECH June 15, 2019 at 7:38 pm - Reply

    May I know what is the difference between ("yes x==10") and ("no x!=10")
    Both statements convey same meaning😂😂😂😂😂

  11. Mehak Ellahi June 15, 2019 at 7:38 pm - Reply

    "!" This is called "not"

  12. michael ameyaw June 15, 2019 at 7:38 pm - Reply

    That's a great lecture God richly bless you and grant you more wisdom and understanding to help others in Jesus name.

  13. Skychrew June 15, 2019 at 7:38 pm - Reply

    Thanks dude I understand now

  14. Rafif Zahin June 15, 2019 at 7:38 pm - Reply

    Oh God this is ! an exclamation mark.

  15. Jatin Chaturani June 15, 2019 at 7:38 pm - Reply

    thanks ur videoes are really helping me to learn Java

  16. deepcovergecko 1907 June 15, 2019 at 7:38 pm - Reply

    You are my favorite Indian 😀

  17. Raphael Granado June 15, 2019 at 7:38 pm - Reply

    Why is it that when I type else it says I have a syntax error?

  18. VIKAS PRADHAN June 15, 2019 at 7:38 pm - Reply

    why am i getting a syntax error on "else"?

  19. Ibrahim El Mountasser June 15, 2019 at 7:38 pm - Reply

    Else if ?

  20. Kino -Imsure1200q June 15, 2019 at 7:38 pm - Reply

    thnx. here's my code in public static void main.

    if( x == 10 ) { System.out.println("Yes, variable X is equal to 10. Ice cream for you!"); }
    else{ System.out.println("Sorry, but variable X is equal to " + x + ". Sad life for you…");}

    i didnt implement something with infinite else ifs cuz if i do my space will be wasted. well unless i reach 2^64-1 then ok…
    Sorry if my code is wrong im still learning. Im just a child but my parents allow me to do this.

  21. Kino -Imsure1200q June 15, 2019 at 7:38 pm - Reply

    ok if x == 20 then yes x = 10? wut?

  22. Ajaz Ahmed Khan June 15, 2019 at 7:38 pm - Reply

    please also give excercises related to the topic !! this will help us learning more and more !! thank you nice tutorials

  23. kuki singh June 15, 2019 at 7:38 pm - Reply

    bhia tum kha the

  24. Alex Eliot Official June 15, 2019 at 7:38 pm - Reply

    public static void main(String[] args) {
    Scanner inputnumber = new Scanner (System.in);
    System.out.println("How much is 260 – 30");
    int x = inputnumber.nextInt();
    if (x == 230)
    {
    System.out.println("Wow you're smart it's actually 230!");
    }
    else
    {
    System.out.println("Holy shit get smarter idiot");
    }
    }

    }

  25. Irfan Shariff June 15, 2019 at 7:38 pm - Reply

    What is the shortcut key to see details syntax? In this video "if syntax shown"

  26. Sanguah 95 June 15, 2019 at 7:38 pm - Reply

    love this thang for sho

  27. Andreas P June 15, 2019 at 7:38 pm - Reply

    this does no work with new java. Bad outdated video

  28. Philips Nwokocha June 15, 2019 at 7:38 pm - Reply

    You are a very good teacher, your clearification and explanation is very helpful.

  29. Chris Z June 15, 2019 at 7:38 pm - Reply

    Great teacher! Very detail. For the beginner is very useful.

  30. jellyfishcandles June 15, 2019 at 7:38 pm - Reply

    bruh

  31. Vaijayanti Mahajan June 15, 2019 at 7:38 pm - Reply

    its good thank you

  32. daniela baya June 15, 2019 at 7:38 pm - Reply

    I want to thank you for doing this videos! I'm currently learning Java and it's not coming easy to me. You are very clear to understand. Thank you!

  33. yuncheng Xue June 15, 2019 at 7:38 pm - Reply

    It's good. Thanks a lot.

  34. MegaCrazyBOSS June 15, 2019 at 7:38 pm - Reply

    exclamation mark

  35. Dávid Urminský June 15, 2019 at 7:38 pm - Reply

    this video solved my problem thx very much i love you 🙂

  36. Biedrzysław Wspaniały June 15, 2019 at 7:38 pm - Reply

    Audio is far too quiet 🙁

  37. Tutorial step by step June 15, 2019 at 7:38 pm - Reply

    This is very good Channel for programming tutorials

  38. Adrian Stef June 15, 2019 at 7:38 pm - Reply

    Thank you man im 17 years old , im not so good at english but i learn a lot from this video i like very much to do that today i seen first ur 8 ep. and im going to see more
    im from romania but
    i have to ask u something , if i dont pass my baccalaureate (because im not so intelligent) can i do something with what i learn there? i know u cant give me a certificate but i want know where i can go with that because i rly like to do that

  39. abdelrhman elhedody June 15, 2019 at 7:38 pm - Reply

    any one can help
    there is something wrong !!!! it is giving me all time
    yes x == 10
    dosent matter it is right or wrong 🙁

  40. Android June 15, 2019 at 7:38 pm - Reply

    There are two types of people.
    If(x==y){

    }
    and

    if(x==y)
    {

    }

  41. Wolf Dota June 15, 2019 at 7:38 pm - Reply

    guys what am i doing wrong

    package l;

    public class Defaullt {

    public static void main(String[] args) {
    int x =10;

    if (x == 10)
    System.out.println("yes x == 10");
    }
    else {
    System.out.println("no x != 10");

    }

    }

    it gives the error
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:

    at l.Defaullt.main(Defaullt.java:5)

  42. BOG Networker Life-Style June 15, 2019 at 7:38 pm - Reply

    good quality videos ☺

  43. noelkalel June 15, 2019 at 7:38 pm - Reply

    what did u press in order to get "teal lines" started from 0:55 between public class and public static void. tnx.

  44. Matthew James June 15, 2019 at 7:38 pm - Reply

    public static void main(String[] args) {
    int x;
    x=10;
    if (x==20)
    {
    System.out.println("X is equal to 20");

    }

    else if (x==15)
    {
    System.out.println("X is equal to 15");

    }

    else

    System.out.println("X is equal to 10");

    }

Leave A Comment

*