Skip to content

Instantly share code, notes, and snippets.

@coolsasindu
Last active March 15, 2021 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coolsasindu/0f5b3b9eb258ab554afbcfad4b5c1566 to your computer and use it in GitHub Desktop.
Save coolsasindu/0f5b3b9eb258ab554afbcfad4b5c1566 to your computer and use it in GitHub Desktop.
class Conditional_opr {
public static void main(String args[]){
boolean Ans = false;
int i = Ans ? 1 : 0; // 0
System.out.println(i);
//-----------------------------------------
boolean Ans1 = true;
String a = Ans1 ? "yes" : "no"; // 1
System.out.println(a);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment