As soon as I saw Mike's post I went and started writing some test cases
in Java and CFMX. Looks like I was wrong on this point. It gets worse
too. Sean posted code on the BACFUG list on how to override methods in
extended CFCs. So it looks like I was wrong on that point too. Maybe I
have had too much to drink as I don't ever remember being flat out wrong
like this before.

-Matt

> -----Original Message-----
> From: Pete Freitag [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 29, 2002 5:25 PM
> To: CF-Talk
> Subject: RE: I like CFMX
> 
> Yes, that's very odd, Matt were you thinking of protected access
> specifies...
> 
> Here's some Java code that if you cannot compile (at least not in 1.3)
> 
> Here's the compiler error
> 
> Tester.java [25:1] private void method() has private access in Tester
>         super.method();
>               ^
> 1 error
> Errors compiling Tester.
> 
> and the code...
> 
> public class Tester {
> 
>     public static void main(String args[]) throws Exception{
>         SubTester st = new SubTester();
>         st.doMethod();
>     }
> 
>     private void method() {
>         System.out.println("Tester::method");
>     }
> 
> }
> 
> 
> class SubTester
>     extends Tester
> {
>     public void doMethod() {
>         this.method();
>     }
>     private void method() {
>         super.method();
>         System.out.println("SubTester::method");
>     }
> }
> 
> Matt I think you may need to cut back on the alcohol :)
> 
> _____________________________________________
> Pete Freitag ([EMAIL PROTECTED])
> CTO, CFDEV.COM
> ColdFusion Developer Resources
> http://www.cfdev.com/
> 
> 
> -----Original Message-----
> From: Mike Chambers [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 29, 2002 7:43 PM
> To: CF-Talk
> Subject: RE: I like CFMX
> 
> 
> hmm, thats odd.
> 
> >From Java In A NutShell 3rd ed.(published by Oreilly)
> 
> Page 106 : Access to members
> 
> "If a member of a class is declared private, the member is never
> accessible except within the class itself."
> 
> Page 107 : Access control and inheritance
> 
> "Private fields and methods are never inherited..."
> 
> we are talkig about the same thing aren't we?
> 
> mike chambers
> 
> [EMAIL PROTECTED]
> 
> > -----Original Message-----
> > From: Matt Liotta [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 29, 2002 7:14 PM
> > To: CF-Talk
> > Subject: RE: I like CFMX
> >
> >
> > In Java, a subclass does in fact inherit private methods and
> > properties.
> >
> > -Matt
> >
> > > -----Original Message-----
> > > From: Mike Chambers [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, April 29, 2002 3:59 PM
> > > To: CF-Talk
> > > Subject: RE: I like CFMX
> > >
> > > matt,
> > >
> > > correct if i am wrong (my java is a little rusty), but when
> > inheriting
> > > from a class in java, the subclass does not inherit private
> > methods or
> > > properties from the superclass (only protected and public).
> > >
> > > mike chambers
> > >
> > > [EMAIL PROTECTED]
> > >
> > > > -----Original Message-----
> > > > From: Matt Liotta [mailto:[EMAIL PROTECTED]]
> > >
> > > > There are a lot of ways to argue this point. My point of view
> > > > is that MM
> > > > shouldn't tease us with OO type constructs. Either gives
> > > > everything J2EE
> > > > has to offer or don't bother at all.
> > > >
> > > > -Matt
> > >
> > >
> >
> 
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to