Java | Prolog |
Integer | integer |
Double | real |
Long | integer |
BigInteger | integer |
String | atom |
Object array | list |
Object | $addr(I1,I2) |
The conversion between arrays and lists needs further explanation. A Java array of some type is converted into a list of elements of the corresponding converted type. For instance, an Integer array is converted into a list of integers. In contrast, a Prolog list, whatever type whose elements belong to, is converted into an array of Object type. When an array element is used as a specific type, it must be casted to the type.