Monday, September 10, 2012

SUN 310-084 exam question


As IT certifications becoming more and more popular, we decided to have a try, just to make more money, and make ourselves more competitive in this society.

We took the 310-084 exam, but when we saw the large quantities of study materials, we became a little anxious. We studied day and light till someday I felt that we could not capture the main points of the real test, so I entered the professional SUN forum to copy others experience.

1. Given the function invocation expression ${my:reverse("42")}, and that the function reverse is mapped
into a Java method called reverse, which two are valid signatures for the Java method reverse? (Choose
two.)
A. public int reverse(String val)
B. public String reverse(String val)
C. public static int reverse(String val)
D. public static String reverse(int val)
E. private static double reverse(double val)
F. public int reverse(String value, String name)
G. public static int reverse(int value, String name)
Answer: CD

2. For an HttpServletResponse response, which two create a custom header? (Choose two.)
A. response.setHeader("X-MyHeader", "34");
B. response.addHeader("X-MyHeader", "34");
C. response.setHeader(new HttpHeader("X-MyHeader", "34"));
D. response.addHeader(new HttpHeader("X-MyHeader", "34"));
E. response.addHeader(new ServletHeader("X-MyHeader", "34"));
F. response.setHeader(new ServletHeader("X-MyHeader", "34"));
Answer: AB

3. For a given ServletResponse response, which two retrieve an object for writing text data? (Choose
two.)
A. response.getWriter()
B. response.getOutputStream()
C. response.getOutputWriter()
D. response.getWriter().getOutputStream()
E. response.getWriter(Writer.OUTPUT_TEXT)
Answer: AB

No comments:

Post a Comment