• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

can someone help me out

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a static vector of objects of class in which this vector has been defined
i have an instance method which takes vector as argument & scans for perticuler object of vector
then when i call that method & send static vector as an argument
Would it scan the object or all objects would be static...
?
thanx in advance

 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to move this to Java - Beginners forum. I think you will get a better response.
Bill
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ashraf,
iam not sure what u are trying to ask, mebbe u shd try providing a code sample, but iam a greenhorn anyways!!! so, mebbe someone else will understand ur q and answer it before me...
bhooshan
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, If you have a static vector in your class, and the method is in the same class, you do not need to send the vector to the method as an argument. The method will be able to get at and scan the vector anyway.
As long as the instance got loaded to the vector before you call this method, you should be able to locate the reference to the instance in the vector no problem.
 
Quick! Before anybody notices! Cover it up with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic