Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: ArrayAdapter References: <8vi26oFvh2U1@mid.individual.net> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 31 Mar 2011 10:19:36 GMT Lines: 15 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1301566776 tunews.univie.ac.at 60386 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2642 Arved Sandstrom wrote: > On 11-03-30 10:03 PM, Dirk Bruere at NeoPax wrote: >> I have an ArrayAdapter in main. >> How do I access it from another class? > I trust you mean a Main class, not a "main" method. Now, that you spell it out like this, it seems more likely, that an ArrayAdapter-instance is stored in a local variable of public static void main(String[] args). Unless main passes the reference to another class, I doubt there'd be a way for that other class to access the reference. Perhaps, reflection can still do it, but I wouldn't bet on it.