Data Types Arithmetic Operations
Data Types Arithmetic Operations
• Syntax Errors
• Detected by the compiler
• Runtime Errors
• Causes the program to abort
• Logic Errors
• Produces incorrect result
Syntax Errors 3
6
Primitive Data Types
Positive range: 8
4.9E-324 to 1.7976931348623157E+308
Non-numeric Literals
String Data Type
Examples:
“Ruba”
“Ahmad”
“1001”
“ 1.5”
10
Variables definition 11
int
firstName
double
st_id
String
s1
.
S1M0
.
.
.
.
Naming Conventions