Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: How to assign an object to another in it method? Date: Fri, 14 Jul 2017 06:40:33 -0000 (UTC) Organization: A noiseless patient Spider Lines: 18 Message-ID: References: <46334961-cc18-491f-828c-32e7401c7832@googlegroups.com> Reply-To: avl@logic.at Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 14 Jul 2017 06:40:33 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9d331af186c81913b37922fd76a534bf"; logging-data="21678"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+d9a+zoyUJ/zHfwUW3qcRS" User-Agent: slrn/1.0.2 (Linux) Cancel-Lock: sha1:c4bHISiUd4Ka9TcRUNab3A8WDfw= Xref: csiph.com comp.lang.java.programmer:36925 Arne Vajhøj wrote: > But it shows the same thing. > [...] > But: > - you would get the same effect without default values for non-virtual > methods default values in C++ are not polymorphic, so, indeed, it would seem consistent with non-polymorphic (non-virtual) methods. > - how do you know that the method is virtual without noticing the > default values? by letting the override do something observably different, as my own example did.