Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Inner Classes a liability

Thread Tools

Inner Classes a liability

Roedy Green
Posts: n/a
On Tue, 4 May 2004 15:20:19 +0000 (UTC), Removed) (Bent C
Dalager) wrote or quoted :

>I agree. I think of it as short-hand for "OuterClass.this." provided
>by a (perhaps overly helpful) compiler.

I was working an a program on the weekend where I was puzzled at error
messages. They all cleared up when I fully qualified Outerclass.this
and Outerclass.somestatic. Sometimes it seemed to me the compiler
should have been be able to tell what I meant, but it could not. I
decided then just to always qualify. Probably helps programmers too
to know where to look for the variable definitions.

Then there is that strange "final" rule.

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See for The Java Glossary.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
failing to instantiate an inner class because of order of inner classes Pyenos Python 2 12-27-2006 11:19 PM
Debate: Inner classes or public classes with package access? Christian Bongiorno Java 5 08-30-2004 08:14 AM
What is the difference between nested classes and inner classes ? Razvan Java 5 07-27-2004 07:59 PM
How to access inner classes variables & methods from outer classes lonelyplanet999 Java 1 11-13-2003 01:54 PM
inner classes in python as inner classes in Java Carlo v. Dango Python 14 10-19-2003 08:49 AM