Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题

4星(超过85%的资源)
所需积分/C币:49 2018-08-02 22:41:09 3.86MB PDF
107
收藏 收藏
举报

Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题
public static void main(string[] args)t Chort s1 =2005 工 nteger s2=400 Long s3=(long) s1 t s2 //line n1 String s4 =(String) (s3* s2) line 12 System. out. println(Sum is+ s4) What is the result? A. Sum is 600 B. Compilation fails at line n 1 C. Compilation fails at line n2 D. A Class castException is thrown at line n 1 E. A Class CastException is thrown at line n2 Correct Answer: c Section: (none Explanation Explanation/Reference: QUESTION 4 What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class? A. Encapsulation B. Inheritance C. Abstraction D. Instantiation E. Polymorphism Correct answer:a Section:(none) Explanation Explanation /Reference Explanation Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world Referencehttp://www.tutorialspoint.com/iavaliavaaccessmodifiers.htm QUESTION 5 Given the code fragment a上g七 ract. c1as卫1anet protected void revolve( t //line n1 点上 stract i○ id rotate(〕F //line n2 class earth extends planet i v③idreⅴ。1ve() //line n3 protected void rotate() i // line n 4 Which two modifications, made independently, enable the code to compile? A. Make the method at line n1 public B. Make the method at line n2 public C. Make the method at line n3 public D. Make the method at line n3 protected E. Make the method at line n4 public Correct Answer: CD Section:(none Explanation Explanation/Reference QUESTION 6 Given class vehicle i String type =40 int maxspeed =100 i Vehicle (string typer int maxspeed) this type = typei this. maxspeed maxspeedp class car extends vehicle i string trans i Car (string trans)[ /1ine n1 this, trans trans i car(string typer int marspeed, string trans) i super (type, maxSpeed)i this〔 trans); i/line n2 And given the code fragment 7. Car cl =new Car(Auto) 8. Car c2 new Car(4T, 150rfanual) 9. System. out. printIn(cl type tt cl. nmaxspeed -m+ cl. trans 10. System. out. println(c2 type tt az5p合e以-"甲 C2. trans)i What is the result? A. 4W 100 Auto 4∨150 Manua B. Null o auto 4W 150 Manual C. Compilation fails only at line n 1 D. Compilation fails only at line n2 E. Compilation fails at both line n 1 and line n2 Correct Answer:c Section: (none Explanation Explanation/Reference: QUESTION 7 Given the code fragment public static void main(string[] args) stringBuilder sh= new stringBuilder(5) string s =; fsh.equa1s(s〕) System. out. println(Match 1); else if(sb. tostring(.equals(s tostring()) System. out. println(Match 2) y else i Systemm out println( No Match") What is the result? A. Match 1 b. Match 2 C. No Match D. A NullPointerEXception is thrown at runtime Correct answer: B Section: (none Explanation Explanation/Reference: QUESTION 8 Giyen Pub1 ic static void mmain〔 string[]arg当) 七 ring ta AI 七a=ta, concat〔"E" String th =C 七a=七a.C○nCat(七b) 七.ep1ace〔"c;D"; 七a=a.C○nCat〔七b) Systenm, out. println(ta)i What is the result? A ABCD B. ACD C, ABCC D.ABD E ABDC Correct Answer: C Section :(none) Explanation Explanation/Reference: ta replace (C, D"); a= ta replace (C, d) 则选E QUESTION 9 Given class cD i lnt FF CD(int r)i 七h r=if C1as吕Dⅴ D eAten吕CD{ Int c DYD〔 Lnt r int c i line n1 And given the code fragment dVd dvd neW DVD(10,20); Which code fragment should you use at line n 1 to instantiate the dvd object successfully? A)superr =r 七h1s.c C B)super(r) this C) super(r) 七hs,C=C; 七h1 e11per(c〕 A. Option A B. Option B C. Option c D. Option d Correct Answer: C Section:(none Explanation Explanation/Reference: QUESTION 10 Given the code fragment lnt al 1;2;3 for (xXx i System.out. print (ale])i } Which option can replace xxx to enable the code to print 135? A. int e=0: e<=4: 0++ B.inte=0;e≤5;e+=2 C.inte=1;e<=5;e+=1 D. int e=1; e<5; 8+=2 Correct answer: B Section: (none) Explanation Explanation/Reference: QUESTION 11 Which statement best describes encapsulation? A. Encapsulation ensures that classes can be designed so that only certain fields and methods of an object are accessible from other objects B. Encapsulation ensures that classes can be designed so that their methods are inheritable C. Encapsulation ensures that classes can be designed with some fields and methods declared as abstract D. Encapsulation ensures that classes can be designed so that if a method has an argument My T ype x, any subclass of Mytype can be passed to that metho Correct Answer:A Section: (none) Explanation Explanation/Reference QUESTION 12 Given the code fragment from three files: alesMan. java package sales pub11cc1a三SSa1e≥Man Product. java package sales products Pub111a吕吕P○d1ct{} Market. java 1. package market: 2 insert code her 3. public class usMarket i 4 Salesman srmp product Which code fragment, when inserted at line 2, enables the code to compile? C Import sales.* CB)import java. sales products. cC) import sales import sales products CD) irnport sa1es,大; import products.*i C Import sales import sales, products. *i A. Option A B. Option B C. Option c D. Option D E. Option E Correct Answer: E Section: (none Explanation Explanation/Reference QUESTION 13 Given the following class public class CheckingAccount i public int amount public CheckingAccount (int amount)i this. amount amount public int getAmount ()i eturn ar01n七 public void changeAmmount (int x)[ mount十=x And given the following main method located in another class oubl-c static vcid main (string[l args)i Checkingacccunt acct =new checkingAccount ((int)(rath. random*1030))i system. out. println(acct getAmount Which three lines, when inserted independently at line n1, cause the program to print a 0 balance? A. this amount = o B. amount =0: C. acct(O) D. acct, amount =0 E. acct getAmount (=0 F. acct. changeAmount(O) G. acct. changeAmount(-acct amount) H. acct change Amount(-acct getAmounto) Correct Answer: DGH Section: (none) Explanation Explanation/Reference: QUESTION 14 Given the code fragment string shirts[][]= new string[2][2] shirts[o[o] shirts[o][1 shirts[1][o] small shirts[il[ll =medium Which code fragment prints red: blue: small: medium? C A for (int inde i: inde : index十+) Ior 1nt 1dx dx 2 ldx++ System. out. print (shirts[indexlidx CB)f。r( ant index=0 de 已;十+ index for int ida =0: ldx index; ++idm dystem out. print (shirts[index[idx]+:) C)for (string lors for (string s: sizes) Systerm. out. printin(s+ cD)for (int index =0; index 2:)( n七id idx <2:35 System, out. print (shirts[index][idx]+:)F ldx++i dext+ A. Option A B. Option B C. Option c

...展开详情
试读 124P Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
weixin_41183644 还行,希望有用,不知道是哪个年代的题库,纯英文题目,没英文功底看起来费力
2019-10-10
回复
konami2004 还不错,不知道是不是最新的
2018-09-30
回复
sunjiannankai 感觉还可以,希望是最新的题库。非常感谢
2018-09-26
回复
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
关注 私信
上传资源赚钱or赚积分
最新推荐
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题 49积分/C币 立即下载
1/124
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第1页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第2页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第3页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第4页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第5页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第6页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第7页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第8页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第9页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第10页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第11页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第12页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第13页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第14页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第15页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第16页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第17页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第18页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第19页
Oracle公司 Java8 Java SE 8 Programmer I 认证考试1z0-808题库 总167题第20页

试读结束, 可继续阅读

49积分/C币 立即下载 >