Free Oracle 1Z0-819 Exam Questions (page: 8)

Given:



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

  1. public Collection<String> foo(Collection<String> arg) { ... } overrides Foo.foo.
  2. public <T> Collection<T> foo(Stream<T> arg) { ... } overloads Foo.foo.
  3. public <T> List<T> foo(Collection<T> arg) { ... } overrides Foo.foo.
  4. public <T> Collection<T> foo(Collection<T> arg) { ... } overloads Foo.foo.
  5. public <T> Collection<T> bar(Collection<T> arg) { ... } overloads Foo.foo.
  6. public <T> Iterable<T> foo(Collection<T> arg) { ... } overrides Foo.foo.

Answer(s): C,F



Given the code fragment:



What is the result?

  1. ab cd ef
  2. An ArrayIndexOutOfBoundsException is thrown at runtime.
  3. The compilation fails.
  4. abc def
  5. ad be cf

Answer(s): E



Given:



executed using command:

java Hello "Hello World" Hello World

What is the output?

  1. An exception is thrown at runtime.
  2. Hello WorldHello World
  3. Hello World Hello World
  4. Hello WorldHelloWorld
  5. HelloHello WorldHelloWorld

Answer(s): C



Given:



Which two constructors will compile and set the class field strings? (Choose two.)

  1. Option A
  2. Option B
  3. Option C
  4. Option D
  5. Option E

Answer(s): C,E



Viewing page 8 of 66



Post your Comments and Discuss Oracle 1Z0-819 exam prep with other Community members:

1Z0-819 Exam Discussions & Posts