Source code for XORExerciseExample1.java:

public class XORExerciseExample1
{
	public static void main(String args[])
	{
		// XORExerciseExample1
		boolean b1 = true;	// Change as needed.
		boolean b2 = false;	// Change as needed.
		if (b1 ^ b2)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}

Output from XORExerciseExample1.java:

Yes

--- Output Ends ---

NOTE:

You are reading previously generated output. You are not currently running the XORExerciseExample1 application at the momement. You need to compile and run the source code first.

To run this program:


Authors: Kevin Chu and Eric Brower
Copyright 2000 Prentice Hall PTR