Skip to content

Instantly share code, notes, and snippets.

@rshepherd
Last active December 23, 2015 16:19
Show Gist options
  • Save rshepherd/6661461 to your computer and use it in GitHub Desktop.
Save rshepherd/6661461 to your computer and use it in GitHub Desktop.
What does this print?
boolean a = false;
boolean b = true;
// Example 1
if(b);
a = true;
System.out.println(a)
// Example 2
if (a)
System.out.println(a)
if (b)
System.out.println(b)
else
System.out.println("?")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment