Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Passing a Method Name to a Method Date: Wed, 22 Jun 2011 22:09:05 -0400 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: <81h4075t4gfjglji1n033rb20025ebho68@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 23 Jun 2011 02:10:00 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="BrOwaJANne849xlH+KPYjQ"; logging-data="6929"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XdRduCwgQ9v+knN4bu7kR" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <81h4075t4gfjglji1n033rb20025ebho68@4ax.com> Cancel-Lock: sha1:bvGtjpBPkZEu7dJ4CqQdKNkCScA= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5564 On 6/22/2011 3:46 PM, Gene Wirchenko wrote: > Dear Jav'ers: > > Maybe I will find this after searching more, but so far, no good. > > I want to pass a parameter of a method name to another method. > > N.B.: I do not want to pass the method name as a string. I want > to pass it as a pointer / reference / whatever term is used for this > in Java. (It's "reference." The only data items a Java program can manipulate are primitives and references.) Pass a reference to an object that implements an agreed-upon interface. See, for example, the two-argument version of java.util.Arrays.sort(). Y'know, Gene, you've been asking a spate of pretty elementary questions. Maybe some time with a textbook or other documentation would be helpful, or possibly relocation to c.l.j.help, which is more beginner-oriented. -- Eric Sosman esosman@ieee-dot-org.invalid