December 26, 2003 Q: Does Java have an operator like sizeof() in C? A: A superficial answer is that Java does not provide anything like C's sizeof(). However, let's consider why a Java programmer might occasionally want it. A C programmer manages most datastructure memory allocations himself, and sizeof() is indispensable for knowing memory block sizes to allocate. Additionally, C memory allocator
![Sizeof for Java](https://cdn-ak-scissors.b.st-hatena.com/image/square/36e6fb9db83431193a6d3c7a1cd7481586a70052/height=288;version=1;width=512/https%3A%2F%2Fidge.staticworld.net%2Fifw%2FIFW_logo_social_300x300.png)