Simple Problem
I'm sure this is a really simple problem, but I'm quite new to Java and I can't figure it out, and am now having trouble thinking of a way of describing it...
OK say you have an application which is a book shop, in the main class file you launch from it it creates a new booklist instance to store all the books in the store.
But now then you want to do some work on this instance but from a different class which wasn't the once that called the construction, ie how can an instance be made global?
Hope this makes sense, I see there inheritance but does this provide access to the current instances/variables or just the methods?
cheers,
David
|