|
What this is
Other links
The source codepackage p; //renaming A.m to k class B{ private void m(){ System.out.println("B.m"); } void fred(){ m(); B b= new B(); b.m(); B b1= new A(); b1.m(); B bc= new C(); bc.m(); A ba= new A(); ba.m(); A ac= new C(); ac.m(); C c= new C(); c.m(); } } class A extends B{ void m(){ System.out.println("A.m"); } } class C extends A{ void m(){ System.out.println("C.m"); } } class test{ public static void main(String[] args){ new B().fred(); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.