Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo<T extends Foo<T>> {
- public void doXTo(T other) {
- Foo<T> f = other;
- f.doPrivateX(); // compiles
- other.doPrivateX(); // compilation error: doPrivateX is not accessible!
- }
- private void doPrivateX() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement