File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Determining size of object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Determining size of object?" Watch "Determining size of object?" New topic

Determining size of object?

kavitha vasu
Ranch Hand

Joined: Feb 22, 2007
Posts: 70
How can we estimate the size of the object? i think here we dont have sizeOf operator.

EDIT by mw: Changed subject line to be descriptive (was "java classes").
[ February 22, 2007: Message edited by: marc weber ]
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
The definition of size of the object depends on the object type.

So maybe you could be more specific over what size over what kind of object you want.

Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Java Platform Performance has some tips on how to estimate the size of an object. Object size doesn't matter much to us because Java doesn't have functionality like pointer arithmetic that is frequently used in C/C++.

[How To Ask Questions On JavaRanch]
Willy Thorpe

Joined: Jan 18, 2007
Posts: 2
Boarding interesting about this subject.

"The time will not change of direction when the Universe to start to contract" Stephen Hawking
subject: Determining size of object?
It's not a secret anymore!