This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Cannot access List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Cannot access List" Watch "Cannot access List" New topic
Author

Cannot access List

Varun Nambuthiri
Ranch Hand

Joined: Sep 20, 2010
Posts: 76
Hi

I want to access a list from another class so as to update it in a periodic time interval. The new class where I want to access this list is also in the same package. How can I do that ?

Thanks


All's well that Debugs well .
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43905
    
  33
The same way you would access it anywhere else. But if the List is a private member of another class, and it doesn’t have public getList() or addToList(...) methods, etc., then maybe you ought not to try.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4987
    
    8

Moved from Swing / AWT / SWT / JFace


luck, db
There are no new questions, but there may be new answers.
Varun Nambuthiri
Ranch Hand

Joined: Sep 20, 2010
Posts: 76
Hi ,

But I have declared them as public but I still seem to be able to access them .
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Cannot access List
 
It's not a secret anymore!