C (64-bit, varies by machine) |
JAVA (fixed) |
|
Int |
32 |
The runtime is stored on the stack, and if malloc is stored on the heap, you can change the storage area (register, global variable area) by using a representation word such as static before |
Int |
32 |
The run-time value can be stored on the stack |
Data type |
Short |
16 |
Short |
16 |
Long |
64 |
Long |
64 |
Float |
32 |
Float |
64 |
Double |
64 |
Double |
64 |
|
|
Boolean |
|
Boolean type |
Char |
8 |
Char |
16 |
Character type |
|
|
Byte |
8 |
|
Void |
|
Void |
|
Empty type |
* |
Pointer type |
|
|
|
|
|
Struct |
Class |
|
The reference is stored on the stack, and the instance is stored on the heap |
Combination type |
Union |
|
Enum |
|
Array |
|
|
Array |
|
|
|
|
|
Container |
|
|
Program language contains data types, data manipulation two parts, such as C and Java data types, such as the C language data manipulation is implemented by the function, and object-oriented Java by the method in the class to implement the operation of the data.
C Language and Java language