Please enable JavaScript.
Coggle requires JavaScript to display documents.
CHAPTER 2 (Arithmetic Statements (addition(+), subtraction(-), division…
CHAPTER 2
Arithmetic Statements
addition(+)
subtraction(-)
division (/)
multiplication(*)
modulus (%)
Data Types
Integer
byte
short
int
long
Floating
float
double
Character
Char
Boolean
Identifiers
Cannot be a reserved word
Cannot be true,false or null
Boolean data type
Logical operators
Less than <
Greater than >
Equal to ==
Less than or equal
to <=
Greater than or
equal to >=
Not equal to !=
Boolean operators
not !
and &&
or ||
exclusive or ^
Control Structures
Selection
If-Else
Switch
Loop
While
Do-While
For
Variable
Declaring variables
double price
Assignment Statements and Expressions
int X = 20;
Constants
final double PI = 3.142
Numeric type conversion
float price = 13.789;
double share = (double) income /3;