Tag Archives: enable

Given the code fragment (Exhibit) Which code fragments, inserted independently, enable the code compile?

Given the code fragmentWhich code fragments, inserted independently, enable the code compile? A. fvar = 200; cvar = 400; B. this.fvar = 200; Test2.cvar = 400; C. this.fvar = 200; this.cvar = 400; D. t.fvar = 200; E. cvar = 400; F. t.fvar = 200; Test2.cvar = 400; Correct Answer: E

Given: (Exhibit) Which option should you choose to enable the code to print Something happened?

Given:Which option should you choose to enable the code to print Something happened? A. Add extends GeneralException on line 1.Add extends Exception on line 2. B. Add extends SpecificException on line 1.Add extends GeneralException on line 2. C. Add extends Exception on line 1.Add extends Exception on line 2. D. Add extends Exception on line 1.Add extends GeneralException… Read More »

Given: (Exhibit) What code must you insert on Line 1 to enable the code to print Hello world?

Given:What code must you insert on Line 1 to enable the code to print Hello world? A. Hello myH = new Hello();Hello.Greeting myG = myH.new Hello.Greeting();myG.sayHi(); B. Hello myH = new Hello();Hello.Greeting myG = myH.new Greeting();myG.sayHi(); C. Hello myH = new Hello(); Greeting myG = new Greeting(); myG.sayHi (); D. Hello.Greeting myG = new Hello.Greeting() myG.sayHi(); Correct Answer:… Read More »

Given the code fragment: (Exhibit) Which two modifications, made independently, enable the code to compile?

Given the code fragment:Which two modifications, made independently, enable the code to compile? A. Make the method at line n3 public. B. Make the method at line n4 public. C. Make the method at line n2 public. D. Make the method at line n1 public. E. Make the method at line n3 protected. Correct Answer: A,C

Given the code fragment: (Exhibit) Which two modifications, made independently, enable the code to compile?

Given the code fragment:Which two modifications, made independently, enable the code to compile? (Choose two.) A. Make the method at line n2 public. B. Make the method at line n1 public. C. Make the method at line n3 public. D. Make the method at line n4 public. E. Make the method at line n3 protected. Correct Answer: C,E