Tag: architecture

Questions Related to architecture

  1. Use the setXXX() method defined for the wrapper class.

  2. Use the parseXXX() method defined for the wrapper class.

  3. Use the equals() method defined for the wrapper class.

  4. The value encapsulated by a wrapper class is immutable.


Correct Option: D
  1. Call System.gc()

  2. Garbage collection cannot be forced.

  3. Call System.gc(), passing in a reference to the object to be garbage-collected.

  4. Call Runtime.gc()


Correct Option: B

How do you declare and initialize a String array with two elements in a single line of code?

  1. String [] strArr = [“element 1”, “element 2];

  2. String [] strArr = {“element 1”, “element 2”};

  3. String [] strArr = (“element 1”, “element2”);

  4. String [] strArr = new String [“element 1” , “element 2”];


Correct Option: B

Your Company’s web-site offers the customers price comparisons of different products. You are in charge of converting the web-based solution over to the appropriate J2EE technology. Which of the following should you use?

  1. JSP, Servlets.

  2. JSP, Servlets, EJBs

  3. Applets, EJBs

  4. No need to change it.


Correct Option: A
  1. The EJB tier hosts the application-specific business objects.

  2. The EJB tier does not host system-level services (such as transaction management, concurrency control and security); they are hosted on the EIS tier.

  3. The EJB tier is a link between the web tier and the EIS integration tier.

  4. The EJB tier hosts the entity beans and session beans, data access objects and value objects and perhaps master-detail modeling using enterprise beans.


Correct Option: B
  1. Containers run within servers.

  2. Servers run within containers.

  3. Only one server can run in a container.

  4. Only one container can run in a server.


Correct Option: A