Arithmetical Expression in Java


☞It is defined as a set of variables, constant and arithmetical operators.

☞There are two types of arithmetical expression in java.

1.Pure Arithmetical Expression
2.Impure Arithmetical Expression

Pure Arithmetical Expression

☞If an arithmetical expression contains all the data values(variables or constants) of same data types is known as Pure Arithmetical Expression

Example :

int a,b,c;
a * b + c

Impure Arithmetical Expression

☞If an arithmetical expression contain the data values(variables or constants) of mix data types is known as Impure Arithmetical Expression

Example :

int a,b;
double c;
a * b + c / 5