Class Notes
(809,125)

Canada
(493,536)

Ryerson University
(28,313)

ITM 200
(22)

Vikirmin
(5)

Lecture

# Chapter 5 200.docx

Unlock Document

Ryerson University

Information Technology Management

ITM 200

Vikirmin

Winter

Description

Chapter 5
Boolean Value: true or false
Relational Operators
< less than: 5 < 6
> greater than: m > n
<= less than or equal: 5<=(a+1)
>= greater than or equal: a>=7
== equals: (a+1) == (b+1)
!= not equals: 5!=6
Precedence
1) Brackets
2) Multiplication, Divison, Remainder
3) Addition, Subtraction
4) =, >, !=
IF & ELSE statements
if ()
then
else
= 40)
result='P';
else
{
result=F;
System.out.println("Try again!");
}
**When you develop a branch that will need one or more statments you need curly brackets because it
causes the system to treat the gruop of statements as if their one
Java Logical Connectives
&& AND: p&&q is true if and only if p is true and q is true
|| OR : p||q is true if p or q or both are true
false + false = false
false + true = true
true + false = truetrue + true = true
! NOT: !p is true if p is false, and vice versa
^ Exclusive or:
false + false = false
false + true = true
true + f

More
Less
Related notes for ITM 200