What will the following class print when run?
What will the following class print when run? A. javajava B. lavajava C. javajavac D. lavajavac E. None of these.
What will the following class print when run? A. javajava B. lavajava C. javajavac D. lavajavac E. None of these.
Given the code fragment: Which two try statements, when inserted at line ***, enable you to print files with the extensions.java, .htm, and .jar. A. try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir,"*.{java,htm,jar}")){ B. try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir,"*. [java,htm,jar]")) { C. try…
Which two are valid initialization statements? A. Map<String, String> m = new SortedMap<String, String>(); B. Collection m = new TreeMap<Object, Object>(); C. HashMap<Object, Object> m = new SortedMap<Object, Object>(); D. SortedMap<Object, Object> m = new TreeMap<Object, Object> (); E. Hashtable…
Given: What is the most likely result? A. Main One Two B. Main Two One C. One Two Main D. One Main Two E. Two Main One
Given: What is the result? A. riding riding tolting B. riding riding cantering C. tolting cantering tolting D. tolting cantering cantering E. Compilation fails. F. An exception is thrown at runtime.
Given: What is the result of invoking Car’s scop method? A. Both vehicles and Motorized’s stop methods are invoked. B. Vehicles stop method is invoked. C. Motorized’s stop method is invoked- D. The implementation of the Car’s stop determines the…
Which type of ExecutorService supports the execution of tasks after a fixed delay? A. DelayedExecutorService B. ScheduledExecutorService C. TimedExecutorService D. FixedExecutorService E. FutureExecutorService
Given the directory structure that contains three directories: company, Salesdat, and Finance: Company – Salesdat * Target.dat – Finance * Salary.dat * Annual.dat And the code fragment: If Company is the current directory, what is the result? A. Prints only…
Given: Which two are true about the lines labeled A through D? A. The code compiles and runs as is. B. If only line A is removed, the code will compile and run. C. If only line B is removed,…
Given: StringBuffer b = new StringBuffer("3"); System.out.print(5+4+b+2+1); What is the result? A. 54321 B. 9321 C. 5433 D. 933 E. Output is Similar to: 9java.lang.StringBuffer@100490121. F. Compilation fails.