Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:3.1_data_types_and_values

3.1 Data Types and Values

The Java Card virtual machine supports the same two kinds of data types as the Java virtual machine: primitive types and reference types. Likewise, the same two kinds of values are used: primitive values and reference values.

The primitive data types supported by the Java Card virtual machine are the numeric types, the boolean type, and the returnAddress type. The numeric types consist only of these types:

  • byte, whose values are 8-bit signed two's complement integers
  • short, whose values are 16-bit signed two's complement integers

Some Java Card virtual machine implementations may also support an additional integral type:

  • int, whose values are 32-bit signed two's complement integers

Support for the boolean type is identical to that in the Java virtual machine. The value 1 is used to represent true and the value of 0 is used to represent false.

Support for reference types is identical to that in the Java virtual machine.

javacard/jcvm/3.1_data_types_and_values.txt · Last modified: 2017/05/13 04:10 (external edit)