5. Increment and Decrement Operator The ++ and – are increment and decrement operators. The increment operator increases its operand by one; the decrement operator decreases its operand by one. -- ++
6.
7.
8. Examples 6 5 b = a++ 5 4 4 b = --a 5 4 5 b = a-- 5 6 6 b = ++a 5 Final value of a Final value of b Expression Initial value of a
9.
10.
11.
12.
13.
14.
15. Binary Operators Comparison Operator Bitwise Operators Short Circuit Logical Operators | ^ & as is != == >= > <= < || &&
42. Math class Math.Round(4.9) is 5 Math.Round(4.2) is 4 Math.Round(4.5) is 4 Rounds a value to the nearest integer Round(x) Math.Min(5,9) is 5 Math.Min(5,-9) is -9 Returns the smaller of two number Min(x,y) Math.Max(5,9) is 9 Math.Max(5,-9) is 5 Returns the larger of two number Max(x,y) Math.Floor(5.4) is 5 Math.Floor(5.9) is 5 Returns the largest integer less then or equal to x Floor(x) Math.Ceiling(5.4) is 6 Math.Ceiling(5.9) is 6 Returns the smallest integer greater than or equal to the x Ceiling(x) Math.Abs(-45) is 45 Math.Abs(45) is 45 Returns the absolute value of x Abs(x) Example Description Methods
43. Math class Math.Truncate(38.4) is 38 Math.Truncate(38.485487) is 38 Returns the integral part of x Truncate(x) Math.Sqrt(9) is 3 Math.Sqrt(5) is 2.23606797749979 Returns the square root of x Sqrt(x) Math.Pow(4.2) is 16 Returns x raised to the power y Pow(x,y) Example Description Methods