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 size of vector 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 "size of vector" Watch "size of vector" New topic
Author

size of vector

Puneet N Vyas
Ranch Hand

Joined: Sep 20, 2007
Posts: 61
what defines the size of the vector,i get two conflicting o/p by the following code,can any one tell me.
thanks for support

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41123
    
  45
Why should it return 72? You're adding 216 elements to the vector.



Ping & DNS - my free Android networking tools app
Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
In total agreement with Ulf, 216 elements should be added.
[ April 08, 2008: Message edited by: Gavin Tranter ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

You could try to count the number of times you loop :


[My Blog]
All roads lead to JavaRanch
 
 
subject: size of vector
 
Similar Threads
why hash map contains null
continue blues
hash map error
interface!!!
RLE problem