freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

ocjp題庫(kù)詳解ppt課件-資料下載頁(yè)

2024-12-08 02:50本頁(yè)面
  

【正文】 public Object execute(){ 7. //more code here 8. } 9. } Which statement is true about the classes and interfaces? A. Compilation will succeed for all classes and interfaces. B. Compilation of class C will fail because of an error in line 2. C. Compilation of class C will fail because of an error in line 6. D. Compilation of class AImpl will fail because of an error in line 2. C 052 053 Insert six modifiers into the code such that it meets all of these requirements: 1. It must be possible to create instances of Alpha and Beta from outside the packages in which they are defined. 2. When an object of type Alpha (or any potential subclass of Alpha) has been created, the instance variable alpha may never be changed. 3. The value of the instance variable alpha must always be A for objects of type Alpha. 054 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? A. any class B. only the Target class C. any class in the test package D. any class that extends Target C 055 11. abstract class Vehicle{public int speed(){return 0。}} 12. class Car extends Vehicle{public int speed(){return 60。}} 13. class RaceCar extends Car{public int speed(){return 150。}} ... 21. RaceCar racer = new RaceCar()。 22. Car car = new RaceCar()。 23. Vehicle vehicle = new RaceCar()。 24. (() + , + () 25. + , + ())。 What is the result? A. 0, 0, 0 B. 150, 60, 0 C. Compilation fails. D. 150, 150, 150 E. An exception is thrown at runtime. D 056 5. class Building{ } 6. public class Barn extends Building{ 7. public static void main(String[ ] args){ 8. Building build1 = new Building()。 9. Barn barn1 = new Barn()。 10. Barn barn2 = (Barn)build1。 11. Object obj1 = (Object)build1。 12. String str1 = (String)build1。 13. Building build2 = (Building)barn1。 14. } 15. } Which is true? A. if line 10 is removed, the pilation succeeds. B. if line 11 is removed, the pilation succeeds. C. if line 12 is removed, the pilation succeeds. D. if line 13 is removed, the pilation succeeds. E. More than one line must be removed for pilation to succeed. C 057 21. class Money{ 22. private String country = Canada。 23. public String getC(){return country。} 24. } 25. class Yen extends Money{ 26. public String getC(){return 。} 27. } 28. public class Euro extends Money{ 29. public String getC(){return ()。} 30. public static void main(String[ ] args){ 31. (new Yen().getC() + + new Euro().getC())。 32. } 33. } What is the result? A. Canada B. null Canada C. Canada null D. Canada Canada E. Compilation fails due to an error on line 26. F. Compilation fails due to an error on line 29. E 058 10. interface Foo{ } 11. class Alpha implements Foo{ } 12. class Beta extends Alpha{ } 13. class Delta extends Beta{ 14. public static void main(String[ ] args){ 15. Beta x = new Beta()。 16. //insert code here 17. } 18. } Which code, inserted at line 16, will cause a ? A. Alpha a = x。 B. Foo f = (Delta)x。 C. Foo f = (Alpha)x。 D. Beta b = (Beta)(Alpha)x。 B 059 Given the following directory structure: bigProject |source | | | |classes | And the following mand line invocation: javac –d classes source/ Assume the current directory is bigProject, what it the result? A. If the pile is successful, is added to the source directory. B. The piler returns an invalid flag error. C. If the pile is successful, is added to the classes directory. D. If the pile is successful, is added to the bigProject directory. C 060 1. package 。 2. 3. public class MainClass{ 4. public static void main(String[] args){} 5. } And MainClass exists in the /apps//pany/application directory. Assume the CLASSPATH environment variable is set to . (current directory).Which two java mands entered at the mand line will run MainClass? (Choose two.) A. java MainClass if run from the /apps directory B. java if run from the /apps directory C. java classpath /apps if run from any directory D. javaclasspath . MainClass if run from the /apps//pany/application directory E. java classpath /apps//pany/application:. MainClass if run from the /apps directory F. java if run from the /apps//pany/application directory BC 061 Given two files, and : 1. package 。 2. 3. public class GrizzlyBear extends Bear{ 4. void hunt() { 5. Salmon s = findSalmon()。 6. ()。 7. } 8. } 1. package 。 2. 3. public class Salmon extends Fish { 4. public void consume() { /* do stuff */ } 5. } If both classes are in the correct directories for their packages, and the Mammal class correctly defines the findSalmon() method, which change allows this code to pile? A. add import animals. mammals.*。 at line 2 in B. add import .*。 at line 2 in GrizzlyBearjava C. add import .*。 at line 2 in D. add import animals. *。 at line 2 in B 062 31. class Foo{ 32. public int a = 3。 33. public void addFive(){ a += 5。 (f )。 } 34. } 35. class Bar extends Foo{ 36. public int a = 8。 37. public void addFive(){ += 5。 (b )。} 38. } Invoked with: Foo f = new Bar()。 ()。 (f. a)。 What is the result? A. b 3 B. b 8 C. b 13 D. f 3 E. f 8 F. f 13 G. Compilation fails, H. An exception is thrown at runtime. A 063 11. class ClassA{ } 12. class ClassB extends ClassA{ } 13. class ClassC extends ClassA{ } and: 21. ClassA p0 = new ClassA()。 22. ClassB p1 = new ClassB()。 23. ClassC p2 = new ClassC()。 24. ClassA p3 = new ClassB()。 25. ClassA p4 = new ClassC()。 Which three are valid? (Choose three.) A. p0 = p1。 B. p1 = p2, C. p2 = p4。 D. p2 = (ClassC)p1。 E. p1 = (ClassB)p3。 F. p2 = (ClassC)p4。 AEF 064 class
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1