Free Oracle 1z0-900 Exam Questions (page: 20)

Given the code fragments:


Which action completes this composite primary key implementation?

  1. Add @IdClass annotation at line 1.
  2. Add @Embeddable annotation at line 1 and replace both @Id annotations with @EmbeddedId annotations.
  3. Add @IdClass(ContactId.class) annotation at line 2.
  4. Add @Embeddable annotation at line 1 and @EmbeddedId(ContactId.class) at line 2.

Answer(s): D



Given the code fragment:


How can you apply DateConverter to the birthday field?

  1. by adding @Convert(to=Date.class) at line 3
  2. by invoking the setConverter(DateConverter.class) method on the EntityManager object
  3. by adding @Converter(autoApply=true) at line 1
  4. by adding @Convert((DateConverter.class)) at line 2

Answer(s): A



Which class do you use to handle an incoming JSON Message as a stream?

  1. JsonReader
  2. JsonObjectBuilder
  3. JsonParser
  4. JsonObject

Answer(s): A


Reference:

https://docs.oracle.com/javaee/7/tutorial/jsonp002.htm



Which two approaches would result in the current date being added to the output of a JSP? (Choose two.)

  1. <%= out.printIn(new java.util.Date()) %>
  2. <% out.printIn(new java.util.Date()); %>
  3. <%= new java.util.Date() %>
  4. <% System.out.printIn(new java.util.Date()); %>

Answer(s): A,C


Reference:

http://www.ntu.edu.sg/home/ehchua/programming/java/javaserverpages.html



Viewing page 20 of 36



Post your Comments and Discuss Oracle 1z0-900 exam prep with other Community members:

1z0-900 Exam Discussions & Posts