Tag Archives: statements

Which two statements are true about the PMON background process? (Choose two.)

Which two statements are true about the PMON background process? (Choose two.) A. It registers database services with all local and remote listeners known to the database instance B. It records checkpoint information in the control file C. It frees unused temporary segments D. It kills sessions that exceed idle time E. It frees resources held by abnormally… Read More »

Given: (Exhibit) Which two statements are true if the method is added to Bar? (Choose two.)

Given:Which two statements are true if the method is added to Bar? (Choose two.) A. public Collection<String> foo(Collection<String> arg) { … } overrides Foo.foo. B. public <T> Collection<T> foo(Collection<T> arg) { … } overloads Foo.foo. C. public <T> List<T> foo(Collection<T> arg) { … } overrides Foo.foo. D. public <T> Iterable<T> foo(Collection<T> arg) { … } overrides Foo.foo. E.… Read More »

Given: (Exhibit) Which two statements can be added at line 1 in Bar to successfully compile it? (Choose

Given:Which two statements can be added at line 1 in Bar to successfully compile it? (Choose two.) A. public ArrayList<Integer> foo(Set<String> m) { … } B. public List<Integer> foo(TreeSet<String> m) { … } C. public List<Object> foo(Set<CharSequence> m) { … } D. public List<Integer> foo(Set<String> m) { … } E. public ArrayList<Number> foo(Set<CharSequence> m) { … } F.… Read More »

Which two statements are correct about modules in Java? (Choose two.)

Which two statements are correct about modules in Java? (Choose two.) A. module-info.java can be placed in any folder inside module-path. B. By default, modules can access each other as long as they run in the same folder. C. java.base exports all of the Java platforms core packages. D. A module must be declared in module-info.java file. E.… Read More »

Which two statements are true about Java modules? (Choose two.)

Which two statements are true about Java modules? (Choose two.) A. Any named module can directly access all classes in an automatic module. B. Modular jars loaded from –module-path are automatic modules. C. Modular jars loaded from -classpath are automatic modules. D. If a package is defined in both the named module and the unnamed module, then the… Read More »

Which two statements independently compile? (Choose two.)

Which two statements independently compile? (Choose two.) A. List<? super Short> list = new ArrayList<Number>(); B. List<? super Number> list = new ArrayList<Integer>(); C. List<? extends Number> list = new ArrayList<Byte>(); D. List<? extends Number> list = new ArrayList<Object>(); E. List<? super Float> list = new ArrayList<Double>(); Correct Answer: A,C

Assuming the Widget class has a getPrice method, this code does not compile: (Exhibit) Which two statements,

Assuming the Widget class has a getPrice method, this code does not compile:Which two statements, independently, would allow this code to compile? (Choose two.) A. Replace line 4 with Stream<Widget> widgetStream = widgets.stream();. B. Replace line 5 with widgetStream.filter(a > ((Widget)a).getPrice() > 20.00). C. Replace line 1 with List<Widget> widgetStream = widgets.stream();. D. Replace line 5 with widgetStream.filter((Widget… Read More »

Examine these module declarations: (Exhibit) Which two statements are correct? (Choose two.)

Examine these module declarations:Which two statements are correct? (Choose two.) A. The ServiceProvider module should export the com.myimpl package. B. The placement of the com.example.api API in a separate module, ServiceAPI, makes it easy to install multiple provider modules. C. The Consumer module should require the ServiceProvider module. D. The ServiceProvider module does not know the identity of… Read More »

Given: (Exhibit) Which two statements are true if the method is added to Bar? (Choose two.)

Given:Which two statements are true if the method is added to Bar? (Choose two.) A. public <T> Collection<T> bar(Collection<T> arg) { … } overloads Foo.foo. B. public <T> Collection<T> foo(Collection<T> arg) { … } overloads Foo.foo. C. public <T> Iterable<T> foo(Collection<T> arg) { … } overrides Foo.foo. D. public <T> Collection<T> foo(Stream<T> arg) { … } overloads Foo.foo.… Read More »