This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to print out # of bytes used Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to print out # of bytes used" Watch "How to print out # of bytes used" New topic
Author

How to print out # of bytes used

E Fox
Greenhorn

Joined: Jul 24, 2003
Posts: 16
Is there a method I can use to determine how much space a vector is taking up? For a program I have to write I need to print out how many bites my vector uses after inserting keys into it.
Thanks
E Fox
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

If the objects in your Vector implement java.io.Serializable:


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to print out # of bytes used
 
Similar Threads
I/O with a DefaultTableModel object
toString()...
empty vector cells
why does my code print out the same word 10 times
retrieve beans value using EL expressions