🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ibm.software.vajava.language
Article #5

Re: How to make a member variable of a derivation read-only?

#5
From: Jon Skeet
Date: Tue, 29 Feb 2000 00:00
17 lines
1558 bytes
Hannes.Heckner@munich.ixos.de wrote:

> How can I make foo final in the derivation by OVERLOADING
> foo from the Base class?

You can't. Variables aren't overridden, they are merely shadowed. 
(Overloading is something different, by the way.) The Java Language 
Specification explains this in more detail.

> If you know a solution to this problem, please submit 
> it to http://www.the-codebook.com/show_code.asp?ProblemId=1356

Post in news, expect answers in news...

-- 
Jon Skeet - skeet@pobox.com
http://www.pobox.com/~skeet/
Technical Details
Message-ID: <MPG.1325eec3ad14ad23989eec@news>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <951828737327@munich.ixos.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 100145,d86be700aa9afbe6
X-Google-Attributes: gid100145,public
X-Google-Thread: 114aa0,d86be700aa9afbe6
X-Google-Attributes: gid114aa0,public
X-Google-Thread: 113ae9,d86be700aa9afbe6
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 10a146,d86be700aa9afbe6
X-Google-Attributes: gid10a146,public
X-Google-Thread: f74b3,d86be700aa9afbe6
X-Google-Attributes: gidf74b3,public
X-Google-Thread: fbe9c,d86be700aa9afbe6
X-Google-Attributes: gidfbe9c,public
From: Jon Skeet <skeet@pobox.com>
Subject: Re: How to make a member variable of a derivation read-only?
Date: 2000/02/29
Message-ID: <MPG.1325eec3ad14ad23989eec@news>
X-Deja-AN: 591323434
References: <951828737327@munich.ixos.de>
X-Trace: flex.news.uk.uu.net 951836227 25081 193.132.195.113
Newsgroups: ibm.software.vajava.language,borland.public.jbuilder.java.language,borland.public.jbuilder.java,microsoft.public.java.visualj++,comp.lang.java.help,comp.lang.java.programmer