K
kml4ever28
I'm taking a class at my college, but I'm afraid I just don't quite
understand Boolean and it's applictation. I know it has either a true
or false value, but that's about it. For example, let me include a
snipet from an hw assignment.
Write a Boolean expression that compares the value held by the variable
letter of type char to the constant 'Z' and yields true if letter
is less then 'Z'.
I really don't think the following is right
char letter = 'Z'
boolean isEqual = (letter) ;
If (isEqual)
System.out.print("False");
Else
System.out.print("True");
And I have no idea how I would even go about this.
Write a Boolean expression that yields true if the variable letter of
type char holds a value that is between 'A' and 'Z' inclusive.
Please, I would appreciate any help in understanding this subject.
understand Boolean and it's applictation. I know it has either a true
or false value, but that's about it. For example, let me include a
snipet from an hw assignment.
Write a Boolean expression that compares the value held by the variable
letter of type char to the constant 'Z' and yields true if letter
is less then 'Z'.
I really don't think the following is right
char letter = 'Z'
boolean isEqual = (letter) ;
If (isEqual)
System.out.print("False");
Else
System.out.print("True");
And I have no idea how I would even go about this.
Write a Boolean expression that yields true if the variable letter of
type char holds a value that is between 'A' and 'Z' inclusive.
Please, I would appreciate any help in understanding this subject.