Mark Herschberg, author of The Career Toolkit
https://www.thecareertoolkitbook.com/
Originally posted by Mark Herschberg:
FYI "Java Platform Performance" notes the following sizes (in bytes):
1 byte
2 char
2 short
4 int
4 float
8 long
8 double
4 reference (8 on a 64-bit system)
Although different JVMs may use different (probably larger) sizes.
--Mark
hershey@vaultus.com
Mark Herschberg, author of The Career Toolkit
https://www.thecareertoolkitbook.com/
Senior Software Engineer, IBM
author of: Practical Java
Originally posted by Peter Tran:
The size of the primitive types are the same across different JVMs and different platforms. That means a short will always be 16 bits (2 bytes). This will be true until the JLS changes.
Senior Software Engineer, IBM
author of: Practical Java
Senior Software Engineer, IBM
author of: Practical Java
if we find the primitive types of the attributes and add up the size, won't a Vector, Hashtable and DOMcontaining the same data have equal size? We know this is not the case in actual.
Mark Herschberg, author of The Career Toolkit
https://www.thecareertoolkitbook.com/
Mark Herschberg, author of The Career Toolkit
https://www.thecareertoolkitbook.com/
SCJP 1.5, SCEA, ICED (287,484,486)
Originally posted by Mark Herschberg:
Anil KC,
Can you post your results to the list? I'd be interesting in seeing the differences. Thanks.
--Mark
hershey@vaultus.com
Originally posted by Anil KC:
Peter.H,
What should I do to get into the race for a copy of ur book ? Or am I already in ?
Senior Software Engineer, IBM
author of: Practical Java
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
I'm going to close the thread
A day job? In an office? My worst nightmare! Comfort me tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|