As well as combining different operations, you can mix and match different numeric data types on the same line. The program below uses both ints and doubles, for example.

```
class IntAndDouble {
public static void main (String args[]) {
int i = 10;
double x = 2.5;
double k;
System.out.println("i is " + i);
System.out.println("x is " + x);
k = i + x;
System.out.println("i + x is " + k);
k = i * x;
System.out.println("i * x is " + k);
k = i - x;
System.out.println("i - x is " + k);
k = x - i;
System.out.println("x - i is " + k);
k = i / x;
System.out.println("i / x is " + k);
k = x / i;
System.out.println("x / i is " + k);
}
}
```

This program produces the following output:

% java IntAndDouble i is 10 x is 2.5 i + x is 12.5 i * x is 25 i - x is 7.5 x - i is -7.5 i / x is 4 x / i is 0.25 %