The Artima Developer Community
Sponsored Link

Java Answers Forum
Vector Problem

1 reply on 1 page. Most recent reply: Jul 28, 2003 5:46 AM by Adam Duffy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
E Fox

Posts: 1
Nickname: enfox
Registered: Jul, 2003

Vector Problem Posted: Jul 27, 2003 1:40 PM
Reply to this message Reply
Advertisement
Where do I put "final Vector hashTable = new Vector(20000, 500);" if I want to ba able to insert an object into the vector in a method that is called in main()? Do I put it in main? I have tried putting it after the beginning of the class and I get errors saying hashTable cannot be referenced from static context.

Thanks


Adam Duffy

Posts: 168
Nickname: adamduffy
Registered: Feb, 2003

Re: Vector Problem Posted: Jul 28, 2003 5:46 AM
Reply to this message Reply
Perhaps you mean to declare your hashTable vector as static instead of final. Something like

static Vector hashTable = new Vector( 20000, 500 );


Adam

Flat View: This topic has 1 reply on 1 page
Topic: display image Previous Topic   Next Topic Topic: Yahoo Games Help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use