0
我寫了這個,但我不明白這是什麼。在一行中一起創建父子類的對象?
Public ClassA { //some methods here } Public ClassB extends ClassA { Public static void main(String[] args) { ClassA abc=new ClassB //What is purpose of this line and what advantage it gives us. I accidently wrote this but compiler (Eclipse not generating any error on this statement). }