單項選擇題類Cat采用默認(rèn)構(gòu)造函數(shù),聲明類Cat的實例tom的正確語句是()。

A.Cat tom=new Cat()
B.Cat tom=new tom()
C.Cat tom=new Cat
D.Cat tom=new tom


您可能感興趣的試卷

你可能感興趣的試題

1.單項選擇題基類Cat中定義了方法EatFish(int fishnumber),Cat的實例tom調(diào)用方法的正確語句是()。

A.tom.EatFish()
B.Cat.EatFish(3)
C.tom.EatFish(3)
D.Cat.EatFish()

2.單項選擇題已定義基類Animal,擴(kuò)充類Cat繼承自Animal,表示繼承關(guān)系的正確C#代碼是()。

A.class Cat:Animal{…類內(nèi)部定義省略…}
B.Class Cat:Animal{…類內(nèi)部定義省略…}
C.class Animal:Cat{…類內(nèi)部定義省略…}
D.Class Animal:Cat{…類內(nèi)部定義省略…}