Java Programming Tutorial – 11 – Logical Operators

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


Posted

in

by

Tags:

Comments

29 responses to “Java Programming Tutorial – 11 – Logical Operators”

  1. ANMOL PANDEY Avatar

    how to code greater then 18 bu less then 45

  2. Kathan Desai Avatar

    Bucky Roberts,Sir do you understand how inspirational your tutorials are?You make Programming languages so understandable,that every person looking to code through your videos starts to love coding.
    I belong to that clan of people.Thank you so much Sir.Keep making such videos because these videos are super productive,and yet gain they inspire us a lot.
    Thanks again.

  3. Mohit Dahiya Avatar

    your videos are lagging in my pc ?? please do something to it.

  4. Jayaramu Maddi Avatar

    SO INTERESTING AND SUPER EXPLANATION

  5. CatLadyish Avatar

    wait wait wait, you're letting 11 yo's on your "dating website"? xD

  6. Akshar Joshi Avatar

    you have pretty controversial sexual orientations Bucky.

  7. Akshar Joshi Avatar

    you do not have use flower brackets for if and else statements unlike C and its agonising pain.

  8. Manuel Gozzi Avatar

    You actually make this fun because you explain it so simply. It makes me feel like I'm smart. XD

  9. TheManeOfLife Avatar

    CAN SOMEONE PLEASE EXPLAIN WHEN IS THE BEST TIME TO USE A RETURN METHOD.

  10. Tobias Avatar

    Hi, Im new at coding. I made a dating website much like his, but set the required age at 18 while giving the program 4 options. Either they could individually enter, both could enter or none of them could enter (depending on who met the requirement).

    The code can be found below. I was wondering; is there a smarter way to code this? (aka shorter)

    class Tobias{
    public static void main(String args[]){
    int boy, girl;
    boy = 18;
    girl = 17;

    if (boy >= 18 && girl >= 18){
    System.out.println("You can both enter");
    }else{
    if (boy >= 18){
    System.out.println("The boy can enter");
    }
    if (girl >= 18){
    System.out.println("The girl can enter");
    }
    }
    if (boy < 18 && girl < 18){
    System.out.println("None of you can enter");
    }
    }
    }

  11. iseemtobelost Avatar

    For any British people watching the ' | ' key is just to the right of left shift

  12. Shahriar Rezwan Avatar

    Just an improvisation from a noob:

    import java.util.Scanner;

    public class Baby {

    public static void main (String args []){

    Scanner s = new Scanner (System.in);

    int g, b;

    System.out.print("Enter the age of the Boy: ");

    b = s.nextInt();

    System.out.print("Enter the age of the Girl: ");

    g = s.nextInt();

    if(g < 28 && g >15 && b > 30 && b < 40){
    System.out.print("You can enter");

    }else if(g < 80 && g >60 && b > 40 && b < 60){
    System.out.println("You can enter");
    } else if(g < 80 && g >60 && b > 80 && b < 90){
    System.out.println("You can enter");
    } else{
    System.out.println("Go home dude");
    }

    }

    }

  13. RUDAMENTRY Avatar

    Watching this in 2017

  14. Clash with A Square Avatar

    import java.util.Scanner;
    class ashim{
    public static void main(String args[]){
    Scanner text = new Scanner(System.in);
    int answer;
    int a, b, c, d;
    a=1;
    b=2;
    c=3;
    d=4;
    System.out.println("what is your the capital of nepal?");
    System.out.println("1.kathmandu 2. pokhara" );
    System.out.println("3.jhapa 4. birjung");
    answer= text.nextInt();
    if(answer==1){
    System.out.println("you have answered first question now move towards second.");
    System.out.println("who is the football play with most no. of goals?");
    System.out.println("1.messi 2.c.ronaldo points=5");
    System.out.println("3.pele 4.maradona");
    answer= text.nextInt();
    if(answer==3){
    System.out.println("congrats!! you have answered teo questions right…. points=10");
    System.out.println("who created this great programme?");
    System.out.println("1.mark zukeberg 2.bill gates");
    System.out.println("3.pm of clafornia 4.Ashim dahal");
    answer= text.nextInt();
    if(answer==4){
    System.out.println("you scored 20 points and are a person with good iq.. thanks for playing and tell me about the peogramme..");
    }else{
    System.out.println("plz restart the game coz u have given wrong answer");
    }
    }else{
    System.out.println("plz restart the game coz u have given wrong answer");
    }
    }else{
    System.out.println("plz restart the game coz u have given wrong answer");
    }
    }
    }

  15. Hurricane Lambda Avatar

    A boy who's 18 and a girl who's 68. Oh no. ;.;

    oh and…so somebody who's greater than 10 and somebody who's slightly younger than 60 can date? omg. O.O

    as I continue watching the video he's just entering all the most HORRENDOUS ages for dating…ughhhh disgust idk what to think anymore

  16. Deniel Salvacion Avatar

    Guys i have a question, so im creating a program then the user will input whether he/she is a boy or girl and im getting errors. here's the code
    import java.util.Scanner;
    class if_else {
    public static void main(String args[]) {
    Scanner deniel = new Scanner (System.in);
    String Gender;

    System.out.println("Male or Female? m/f");
    Gender = deniel.nextLine();

    if(Gender = 'M' || Gender = 'm'){
    System.out.println("Boy");

    }
    else if(Gender = 'F' || Gender = 'f'){
    System.out.println("Female");
    } else {
    System.out.println("Invalid");

    }
    }
    }

  17. Thomas Wong Avatar

    This guy is saving my GPA and career

  18. Samuel Kang Avatar

    Is it can not or cannot? Sorry, I am trying to be the most pretentious person in this comments section LMAO.

  19. Dominik Suhajda Avatar

    I did not have an idea what my teacher was talking about until i watched your tutorials , well done. You are still helping people in 2017! 😀

  20. Yosafat C. Saputra Avatar

    System.out.println("Awesome");

  21. Sephardic Ladino Avatar

    How do you add the javadoc into jGrasp?

  22. sean123654 Avatar

    Bucky is a fucking legend

  23. devoiddude Avatar

    When using if but if you want user input , how do you use scanner?

  24. Saurabh Agarwal Avatar

    what is "string args[ ]"?

Leave a Reply

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