Newsgroups: comp.lang.eiffel,comp.lang.beta Path: news.daimi.aau.dk!news-feed.inet.tele.dk!news.maxwell.syr.edu!ott.istar!n4tor.istar!news.istar.net!tor.istar!east.istar!newsjunkie.ans.net!newsfeeds.ans.net!news.phx.mcd.mot.com!schbbs!news From: shang@corp.mot.com (David L. Shang) Subject: Re: Java and Eiffel - Further comments: I am depressed. Reply-To: shang@corp.mot.com Organization: MOTOROLA Date: Fri, 18 Apr 1997 15:53:08 GMT Message-ID: <1997Apr18.155308.10494@schbbs.mot.com> References: <335725DA.9D0@daimi.aau.dk> Sender: news@schbbs.mot.com (SCHBBS News Account) Nntp-Posting-Host: 129.188.128.126 Lines: 93 Xref: news.daimi.aau.dk comp.lang.eiffel:28675 comp.lang.beta:11042 In article <335725DA.9D0@daimi.aau.dk> Gorel Hedin writes: > > No, inner classes in Java are true nested classes as in Simula and BETA > where objects of inner classes live in the context of an object of the > outer class, and can access instance variables and methods in the outer > object. In contrast, the "nested classes" in C++ is only a way of > organizing name spaces and does not have any effect on the objects at > runtime. > > True nested classes is a powerful programming feature which is not > available in C++. > Since Java does not unify the concept of "method" and "inner class", my question is that, does Java's inner class support: 1. Inheritance. Can it extend from another inner class in its enclosing class's superclass? Example in Transframe: class A { class IA { } }; class B is A { class IB is IA { } }; 2. Override. Can its implementation be overriden in its enclosing class's subclasses? Example in Transframe: class A { class IA (interface1), (interface2) { enter (interface1) { // interface1 implementation } enter (interface2) { // interface2 implementation } } }; class B is A { class IA (interface1) { enter (interface1) { // interface1 implementation override } } }; x: A; x := B(); x.IA (parameters_match_interface1); // call the one in B::IA 3. Isolation. Can its implmentation be separated from its interface? Example in Transframe: interface class A { class IA (interface1), (interface2); // interface IA }; class implementationA is A { class IA (interface1), , (interface2) { // implelemtation of IA } }; By the way, since BETA has a unified concept, how does it support the above? David Shang