All Questions
2
questions
3
votes
1
answer
3k
views
child class accessing parent's private method?
A user posted a comment on PHP Visibility manual page. It's the second most voted comment. He used this code example:
<?php
abstract class base {
public function inherited() {
$this-&...
2
votes
3
answers
102
views
Sub-Protected Method in java. (Can't think of a better way to phrase this) [duplicate]
How could I create a method in a given class that can only be called internally by it, and its subclasses.
For example, the class Foo:
public class Foo{
public Foo(){
}
???? void bar(){
...