Re: Curious about method handling
Artem Gr <[email protected]> Fri, 05 Aug 2005 10:26:30 +0400
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
> 2) These both mean the same > println( new A().g ); > println( new A().g() ); > > So the interesting question is how do a get a reference to a non-static > method of class A. > > > This gives a compiler error > >>repeatOnA( new A(), A.g ); > > Class test.A has no static method or static field named g How about that? repeatOnA( new A(), g ); ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf