OCMJEA Mock Exam – 6

ocmjea-thumbnail

127 . In EJB 2.0 what is the Component interface? The interface that Message-Driven Beans must implement There is no component interface in EJB 2.0 The new name for the Home interface The new name for the Remote interface 128 . You are working on a new application that will help your company co-ordinate sales […]

OCMJEA Mock Exam – 5

ocmjea-thumbnail

102 . What do Isolatable and Durable mean with reference to ACID? Isolatable means only 1 transaction can execute at a time Isolatable means the transaction is the same as other transactions in structure Isolatable means a transaction must execute without the interference from other processes or transactions Isolatable means the transaction was started and […]

OCMJEA Mock Exam – 4

ocmjea-thumbnail

77 . You need to replace ASP scripts. What J2EE technology do you use? JMS, JSP and Servlets JSP and Servlets JTA, JSP and Servlets Applets 78 . As part of your new application you need to connect to a database. You don’t have any access to the database server so you can’t change the […]

OCMJEA Mock Exam – 3

ocmjea-thumbnail

52 . You are working for a web design company and one of your clients would like to convert their website that currently uses Perl and CGI scripts over to a language that is easier to maintain and reuse. Their website is a sports betting website where the customer is able to logon and place […]

OCMJEA Mock Exam – 2

ocmjea-thumbnail

27 . ‘A’ has a dependency with ‘B’ is best expressed by? Choose the one below: Option a Option b Option c Option d Option e Options b and d Options d and e 28 . Refer to the following diagram? From the following diagram it can be deduced that: Choose the one below: Changes […]

Finalize Method – OCPJP 6

ocpjp-6-thumbnail

2) What will be the output of the following program? The program will output ‘finalize’. It is unsure that the finalize() method will be called by the Garbage Collector. As soon the object reference ‘object’ is set to null, there is a possibility that the method ‘finalize()’ will be called. The program will cause compile-time […]

Console API – OCPJP 6

ocpjp-6-thumbnail

5) What will be the output of the following program? The program will output ‘100.000000 – 100’. The program will output ‘100 – 100.000000’. The program will throw a IllegalFormatConversionException at run-time. The program will output ‘100 – 100’. Get more questions on Console Answer 5) b. Here the ordering of the arguments (anInt and […]

Garbage Collection – OCPJP 6

ocpjp-6-thumbnail

3) Which of the following statements are true about the following program? The button object ‘button’ will become a candidate for garbage collection as soon the execution of Line A ends since the object is not used elsewhere. The newly created StringBuilder object as a result of method call in Line C becomes eligible for […]

NavigableMap – OCPJP 6

ocpjp-6-thumbnail

NavigableMap is similar to NavigableSet. In NavigableMap we will use key value pairs to reterive the value. see the following code: Look into the following code snippet: In tha bove code NavigableMap API is used for reteriving the less than and greater than value based on key. The output would be like this: 2) What will be the output of the […]

NavigableSet – OCPJP 6

ocpjp-6-thumbnail

NavigableSet API is included in the ocpjp 6 certification exam. This article explains few important methods with simple example program.NavigableSet is the subinterface of SortedSet. This interface defines methods for finding the element in a list. For example lower() method used for finding the element which is less than the given value. Look into the following example: In the […]