java编程思想笔记--多态部分五时间:2022-12-28 18:17:46package test; public class test2 { private int a=5; public void func(){ System.out.println(a); } public static void main(String args[]){ t t1=new t(); t1.func(); } } class t extends test2{ private int a=10; }