多选题GivenafileGrizzlyBear.java: 1.package animals.mammals; 2. 3.public class GrizzlyBear extends Bear{ 4.voidhunt(){ 5.Salmons=findSalmon(); 6.s.consume(); 7.} 8.} and another file,Salmon.java: 1.packageanimals.fish; 2. 3.public class Salmon extends Fish{ 4.voidconsume(){/*dostuff*/} 5.} Assume both classes are defined in the correct directories for theft packages,and that the Mammal class correctly defines the findSalmon()method.Which two changes allow this code to compile correctly?()Aadd public to the start of line 4 in Salmon.javaBadd public to the start of line 4 in GrizzlyBear.javaCadd import animals.mammals.*;at line 2 in Salmon.javaDadd import animals.fish.*at line 2 in GrizzlyBear.javaEadd import animals.fish.Salmon.*;at line 2 in GrizzlyBear.javaFadd import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java
多选题
GivenafileGrizzlyBear.java: 1.package animals.mammals; 2. 3.public class GrizzlyBear extends Bear{ 4.voidhunt(){ 5.Salmons=findSalmon(); 6.s.consume(); 7.} 8.} and another file,Salmon.java: 1.packageanimals.fish; 2. 3.public class Salmon extends Fish{ 4.voidconsume(){/*dostuff*/} 5.} Assume both classes are defined in the correct directories for theft packages,and that the Mammal class correctly defines the findSalmon()method.Which two changes allow this code to compile correctly?()
A
add public to the start of line 4 in Salmon.java
B
add public to the start of line 4 in GrizzlyBear.java
C
add import animals.mammals.*;at line 2 in Salmon.java
D
add import animals.fish.*at line 2 in GrizzlyBear.java
E
add import animals.fish.Salmon.*;at line 2 in GrizzlyBear.java
F
add import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java
参考解析
解析:
暂无解析
相关考题:
现金支出业务的处理程序为()。 A、1.指导填写凭证;2.出纳审核盖章;3.领导审批签字;4.出纳清点支付B、1.指导填写凭证;2.出纳清点支付;3.领导审批签字;4.出纳审核盖章C、1.指导填写凭证;2.领导审批签字;3.出纳审核盖章;4.出纳清点支付D、1.指导填写凭证;2.出纳审核盖章;3.出纳清点支付;4.领导审批签字
现金收入业务的处理程序为()。 A、1.核对收款依据;2.收取款项;3.开具收款证明B、1.收取款项;2.核对收款依据;3.开具收款证明C、1.开具收款证明;2.核对收款依据;3.收取款项D、1.核对收款依据;2.开具收款证明;3.收取款项
振冲置换法桩的间距根据荷载大小和原土的抗剪强度确定,可选用1.5 ~2. 5m, 桩的直径可按每根桩的填料量计算,宜采用()m。A. 0.8 ~1.2 B. 1.5 ~2. 5C. 2. 0 ~2. 5 D. 3. 0 ~3. 5
拟设计独立基础埋深为2.0m,若地基承载力设计值为fa=226kPa,上部结构荷重N= 1600kN, M=400kN·m,基底处Q=5OkN,则经济合理的基底尺寸最接近于( )。A. 3. 8m×4. 6m B. 3. 6m×3. 2m C. 2. 4m×3. 2m D. 2. 8m×2. 6m
不同污秽等级下的爬电比距应符合( )要求。A.污秽等级I——大气轻度污秽地区:1. 6~2. Ocm/kV;B.污秽等级Ⅱ——大气中等污秽地区:2. 0~2. 5cm/kV;C.污秽等级Ⅲ——大气污染较严重地区:2. 5~3. 2cm/kV;D.污秽等级Ⅳ——大气特别严重汚染地区:3. 2~3. 8cm/kV。
电缆桥架水平敷设,宜按荷载曲线选取最佳跨距进行支撑,跨距一般为( )。 垂直敷设时,其固定点间距不宜大于2m。A. 1.0~2. 0m; B. 1.5~2. 5m; C. 1. 5~3. 0m; D. 2. 0~3. 0m。
Given a file GrizzlyBear.java: 1. package animals.mammals; 2. 3. public class GrizzlyBear extends Bear { 4. void hunt() { 5. Salmon s = findSalmon(); 6. s.consume(); 7. } 8. } and another file, Salmon.java: 1. package animals.fish; 2. 3. public class Salmon extends Fish { 4. void consume() { /* do stuff */ } 5. } Assume both classes are defined in the correct directories for theft packages, and that the Mammal class correctly defines the findSalmon() method. Which two changes allow this code to compile correctly?()A、 add public to the start of line 4 in Salmon.javaB、 add public to the start of line 4 in GrizzlyBear.javaC、 add import animals.mammals.*; at line 2 in Salmon.javaD、 add import animals.fish.*; at line 2 in GrizzlyBear.javaE、 add import animals.fish.Salmon.*; at line 2 in GrizzlyBear.javaF、 add import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java
常见的网上购物流程是()。A、1.查找商品2.提交订单3.放入购物车4.查看订单状态5.收货确认B、1.查找商品2.提交订单3.查看订单状态4.放入购物车5.收货确认C、1.查找商品2.放入购物车3.提交订单4.查看订单状态5.收货确认D、1.查找商品2.放入购物车3.提交订单4.收货确认5.查看订单状态
写出分属于下列科的校园植物。 李亚科1.()2.()3.() 苹果亚科1.()2.()3.() 绣线菊亚科1.()2.() 蔷薇亚科() 十字花科1.()2.() 藜科1.()2.() 蓼科() 堇菜科() 卫矛科() 蝶形花科1.()2.()3.()
多选题识读施工图的一般顺序不包括以下哪个()A1.阅读图纸目录;2.阅读设计总说明;3.通读图纸;4.精读图纸B1.阅读设计总说明;2.阅读图纸目录;3.通读图纸;4.精读图纸C1.通读图纸;2.阅读设计总说明;3.阅读图纸目录;4.精读图纸D1.阅读图纸目录;2.精读图纸;3.通读图纸;4.阅读设计总说明
单选题Given: 1.package test; 2. 3.class Target { 4.public String name = "hello";5.} What can directly access and change the value of the variable name?()Aany classBonly the Target classCany class in the test packageDany class that extends Target
多选题GivenafileGrizzlyBear.java: 1.package animals.mammals; 2. 3.public class GrizzlyBear extends Bear{ 4.voidhunt(){ 5.Salmons=findSalmon(); 6.s.consume(); 7.} 8.} and another file,Salmon.java: 1.packageanimals.fish; 2. 3.public class Salmon extends Fish{ 4.voidconsume(){/*dostuff*/} 5.} Assume both classes are defined in the correct directories for theft packages,and that the Mammal class correctly defines the findSalmon()method.Which two changes allow this code to compile correctly?()Aadd public to the start of line 4 in Salmon.javaBadd public to the start of line 4 in GrizzlyBear.javaCadd import animals.mammals.*;at line 2 in Salmon.javaDadd import animals.fish.*at line 2 in GrizzlyBear.javaEadd import animals.fish.Salmon.*;at line 2 in GrizzlyBear.javaFadd import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java