Path: csiph.com!aioe.org!.POSTED.O5hsyUvK01te0L/SZurVSQ.user.gioia.aioe.org!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Java variable access Date: Fri, 12 Apr 2019 12:31:29 -0400 Organization: Aioe.org NNTP Server Lines: 21 Message-ID: References: <109a7224-f392-46c3-bf56-7d8bf2bfb4bf@googlegroups.com> <2a9f711b-78f4-483b-a94d-d7bb86434f1f@googlegroups.com> NNTP-Posting-Host: O5hsyUvK01te0L/SZurVSQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: csiph.com comp.lang.java.programmer:38910 On 4/12/2019 10:58 AM, Eric Sosman wrote: > On 4/12/2019 10:23 AM, Eric Douglas wrote: >> [...] >> That was my thought, to stick with all private/protected variables. [...] >     Note that `protected' variables are accessible *everywhere* > unless your class cannot be extended at all. Yes. But what are one trying to protect against? Normal coding style? Those really intending on circumventing the encapsulation? Extending a class to get access to protected fields are almost as bad as reflection setAccessible. Arne