Fruit类有Apple和Orange两个子类,Fruit fruit=new Apple(); 该语句是对象类型转换中的_______转型。
举一反三
- 下面创建数组的方法正确的有( )。 A: var fruit=new Array("apple","banana","orange","peach"); B: var fruit={"apple","banana","orange","peach"}; C: var fruit=["apple","banana","orange","peach"]; D: var fruit=["apple","banana","orange",123];
- 以下代码的输出结果是。 d={‘fruit’:{‘apple’:4,’orange’:10}} print(d.get(‘apple’,’no’))( ) A: 4 B: no C: fruit D: orange
- 下列语句执行后,di['fruit'][1]值为 。di={'fruit':['apple','banana','orange']}di['fruit'].append('watermelon')
- 执行下面的语句后,输出为______ var fruit= new Array("apple", "orange", " peach","banana");fruit.push("paiapple");alert(fruit.length)
- 中国大学MOOC: "Fruit" is the hyponym of words like "banana", "apple", or "orange".