Lynk Library of Knowledge

9496 Lynk's site for housing knowledge and information for the team.


Project maintained by LynkRobotics Hosted on GitHub Pages — Theme by Jimmy McCosker

if, else if, else







Example

if (x == y){  //"if" statements decide to do something based on if something is true or false.
            System.out.println("x equals y");
        } else if (x > y){ //"else if" allows us to check another statement if the first statement was false                            
            System.out.println("x greater than y");
        } else { //"else" lets us to do things when the if statement is false
            System.out.println("x less than y");
        }




Previous Page / Home / Next Page