Sunday, January 10, 2016

Java How to Test Int, char, boolean the number of bytes?




            


C / C ++ can be sizeof
How to test Java. . .
Reply:
Do not need to test it
And C / C ++ different, java number of bytes int char boolean seemingly is fixed, with the hardware platform and system-independent
int, 32 bit 4 byte
char 16 bits 2 bytes
boolen, 8 bits 1 byte
Reply:
No public API it
Reply:
1L positive solution. Under JVM it is fixed. JNI under reference C / C ++ byte type.
Reply:
Thank you, I've found a way, JAVA there are macros, resolved. .
Reply:
quote 4th floor oldmtn reply:
Thank you, I've found a way, JAVA there are macros, resolved. .
java inside very much like to know how will the macro?
Reply:
java is fixed it

No comments:

Post a Comment