A Boolean variable is a variable, like an int or a string, but whose value is either "true" or "false".
Try this little lump of code, and vary d1 and d2 values, to see the effect:
int d1 = 1
int d2 = 1
snakeeyes = (d1 + d2 == 2);
doubles = (d1 == d2);
boxcars = (d1 + d2 = 12);
System.out.println("Is this snake-eyes?");
// and you can also use it in a logical statement
System.out.println("Is this bpxcars?");
if (boxcars) System.out.println("Yes");
and so on.
It's not clear from your description whether your project calls for one boolean condition for each condition or one for any of them, but I hope this example will illustrate the general method.
Computer Science-Java - Hi, I have to write a method that returns my first name...
Computer science (Java programming) - Why are the use of GUIs and graphics ...
Computer Science-Java - Hi, I have to prompt a user to input a password and have...
Computer Language Java - What is the concept of multi-threading in java and how ...
computer science - i need help about blue j from Java.i have project about ...
computer - this isnt really a school question but i have a question about the ...
computer science - Who invented Java?
Computer Science - Is anyone familiar with JAVA?
computer science - which job titles are consistent only with the java language?
computer science - write a program to select the classes that you are taking(Ex...