"After invoking methods on an entity bean, the client attempts to commit the transaction by invoking the commit method on the UserTransaction interface" (which operates on a CMP)
Also I would like to know that is there any time limit in terms of months after the SCJP exam that I am eligible for the SCWCD exam.
No, you can take it anytime you want
Originally posted by Sri Sri:
i know the difference between finally and finalize. I was asking what you meant when you said the exceptions thrown in finally will not be thrown ?
I guess it is finalize...because as far as i know ...
if there are exceptions thrown in finally, then you need to catch them using nested try-catch block inside the finally block or you have to declare the exception thrown in finally block in method declaration.
On the other hand, finalize method is called when the object is about to be GCed for the first time. If the object is resurrected from the finalize method, then finalize method is not called again...also... if there are exception thrown in finalize method, they dont really matter.
I thought you mixed up finally and finalize in your code......thats why I asked the question...
[ February 09, 2003: Message edited by: Sri Sri ]
Originally posted by Sri Sri:
Aaron, I am just confused, was it "finally" or "finalize" that you meant? i am sure it was a typo
Originally posted by Dan Culache:
Thanks Dan, that I knew but I thought he really meant "constructors". This was my point, the way to differentiate between a constructor and a method with the same name is the fact the constructor doesn't have a return value. But I thought he might have come upon some weird scenario... If not then I'm not sure you cannot do the same in C++ since C++ has basically the same overloading rules.
BTW your mock exam is great. Perfectly suited for overconfident folks like I am
question: An overloading method must have a diferent parameter list and same return type as that of the overloaded method.
explanation: There is no restriction on the return type. If the parameters are different then the methods are totally different (other than the name) so their return types can be anything.
Consider the following lines of code...
System.out.println(null + true); //1
System.out.println(true + null); //2
System.out.println(null + null); //3
Which of the following statements are correct?
a. Each element must be unique.
b. Duplicate elements must not replace old elements.
c. Elements are not key/value pairs.
d. Accessing an element is almost as fast as performing the same operation on an array.
Which of these classes provides the specified features?
i. None of the above
answer: (e) HashSet
A class C has legal implementations of the equals and hashCode methods. On Monday, an instance of the class is created and the hashCode method is invoked. On Tuesday the program is loaded again and an instance of class C is created containing the same data that was loaded on Monday. If the hashCode method is invoked after restarting the program on Tuesday then the hashCode method must return the same integer value that was returned on Monday. (answer is false)