Tag Archives: Insert

Given: public class App { // Insert code here System.out.print("Welcome to the world of Java"); } } Which

Given:public class App {// Insert code hereSystem.out.print(“Welcome to the world of Java”);}}Which two code fragments, when inserted independently at line // Insert code here, enable the program to execute and print the welcome message on the screen? A. static public void main (String [] args) { B. static void main (String [] args) { C. public static void… Read More »

Given: LocalDate d1 = LocalDate.of(1997,2,7); DateTimeFormatter dtf = DateTimeFormatter.ofPattern( /*insert

Given:LocalDate d1 = LocalDate.of(1997,2,7);DateTimeFormatter dtf =DateTimeFormatter.ofPattern( /*insert code here*/ );System.out.println(dtf.format (d1));Which pattern formats the date as Friday 7th of February 1997? A. “eeee d+”th of”+ MMMM yyyy” B. “eeee d’th of’ MMMM yyyy” C. “eeee dd’th of’ MMM yyyy” D. “eeee dd+”th of”+ MMM yyyy” Correct Answer: C

Analyze the code: (Exhibit) Which two options can you insert inside println method to produce Global:namescope?

Analyze the code:Which two options can you insert inside println method to produce Global:namescope? (Choose two.) A. new Test().prefix+new Test().name B. prefix+name C. Test.prefix+Test.getName() D. Test.getName+prefix E. Test.prefix+Test.name F. prefix+Test.name Correct Answer: A,C

Given: LocalDate d1 = LocalDate.of(1997,2,7); DateTimeFormatter dtf = DateTimeFormatter.ofPattern( /*insert

Given:LocalDate d1 = LocalDate.of(1997,2,7);DateTimeFormatter dtf =DateTimeFormatter.ofPattern( /*insert code here*/ );System.out.println(dtf.format (d1));Which pattern formats the date as Friday 7th of February 1997? A. “eeee dd’th of’ MMM yyyy” B. “eeee dd+”th of”+ MMM yyyy” C. “eeee d+”th of”+ MMMM yyyy” D. “eeee d’th of’ MMMM yyyy” Correct Answer: D

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 »

Analyze the code: (Exhibit) Which two options can you insert inside println method to produce Global:namescope?

Analyze the code:Which two options can you insert inside println method to produce Global:namescope? (Choose two.) A. Test.getName+prefix B. new Test().prefix+new Test().name C. Test.prefix+Test.getName() D. prefix+Test.name E. prefix+name F. Test.prefix+Test.name Correct Answer: B,C

Given the code fragment: (Exhibit) Which code fragment, when inserted at // insert code here, enables

Given the code fragment:Which code fragment, when inserted at // insert code here, enables the code to compile and and print a b c? A. ArrayList static update(String [] strs) B. Static ArrayListupdate(String [] strs) C. Static void update (String[] strs) D. List update (String[] strs) E. Static List update (String [] strs) Correct Answer: A

Given: LocalDate d1 = LocalDate.of(1997,2,7); DateTimeFormatter dtf = DateTimeFormatter.ofPattern( /*insert

Given:LocalDate d1 = LocalDate.of(1997,2,7);DateTimeFormatter dtf =DateTimeFormatter.ofPattern( /*insert code here*/ );System.out.println(dtf.format (d1));Which pattern formats the date as Friday 7th of February 1997? A. “eeee dd+”th of”+ MMM yyyy” B. “eeee d+”th of”+ MMMM yyyy” C. “eeee d’th of’ MMMM yyyy” D. “eeee dd’th of’ MMM yyyy” Correct Answer: D

Analyze the code: (Exhibit) Which two options can you insert inside println method to produce Global:namescope?

Analyze the code:Which two options can you insert inside println method to produce Global:namescope? (Choose two.) A. prefix+Test.name B. Test.prefix+Test.name C. Test.prefix+Test.getName() D. prefix+name E. Test.getName+prefix F. new Test().prefix+new Test().name Correct Answer: C,F

Analyze the code: (Exhibit) Which two options can you insert inside println method to produce Global:namescope?

Analyze the code:Which two options can you insert inside println method to produce Global:namescope? (Choose two.) A. prefix+name B. Test.prefix+Test.name C. Test.getName+prefix D. new Test().prefix+new Test().name E. Test.prefix+Test.getName() F. prefix+Test.name Correct Answer: D,E