Answers for "and and or condition in java"

7

java or

int num = 9;

if (num == 1 || num == 2) {
  System.out.println("Nope");
  }

if (num == 1 || num == 9) {
  System.out.println("Yep");
  }
Posted by: Guest on September-14-2020
7

java or

int num = 9;

if (num == 1 || num == 2) {
  System.out.println("Nope");
  }

if (num == 1 || num == 9) {
  System.out.println("Yep");
  }
Posted by: Guest on September-14-2020
4

condition operator in java

b = (a == 1) ? 20: 30;
Posted by: Guest on August-16-2020
4

condition operator in java

b = (a == 1) ? 20: 30;
Posted by: Guest on August-16-2020
2

not equal java

// Int version
int i = 2;
if (i != 3) {}

// String version
String s = "a";
if(!s.equals("b")) {}
Posted by: Guest on May-29-2020
2

not equal java

// Int version
int i = 2;
if (i != 3) {}

// String version
String s = "a";
if(!s.equals("b")) {}
Posted by: Guest on May-29-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language