Mihai Fonoage

Ranch Hand
+ Follow
since Feb 25, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mihai Fonoage

Hi,

A good way of finding this out is from the javadocs page of the Serializable interface, by switching from the Class view to the Use view (at the top of the page, select the "Use" option).

Mihai
I believe that the title of this post is misleading. If the book you bought is not from Whizlab, then you have the author of the book to blame because he only provided two activations with the CD. But again, I doubt that the author did not specify this somewhere.
Nabila, what is the book that you bought?
Tomasz, I took the ePractice exam for the 1.5 version and found no errors as far as I remember.

Doug, indeed in my case too there were many drag-and-drop questions, and also questions where you had to push a button to see the code. The ePractice exam did not come with any drag-and-drop questions, but I believe this is mentioned somewhere in there.

Mihai
Hello everybody,

I passed the SCJP 5 exam today with 84%. I wrote about my experience since I started studying for the exam in my blog and thought I would share it with anybody interested here.

Good luck for those preparing for the exam and congratulations for those who passed it!

Mihai Fonoage
9 years ago
Hi Deepak,

Please search this forum for the problem you mentioned has been already discussed in detail.

Mihai Fonoage
Please read Overriding Vs Hiding from JavaRanch FAQ.

Mihai Fonoage
Details answering your question can be found here.

Mihai Fonoage
You are right Henry (but you probably already new that ). I forgot about the -128 to 127 range for Short and Integer.

Mihai Fonoage
I believe the code is from K&B' book or Master Exam. As for your question, is the instance variable m1 of m2 ever (non-default) initialized? Look at the constructor being called when a new Mixer object is created and assigned to the m2 reference variable.

Mihai Fonoage
Think about it, how would you use the Short instance variable of c1, if c1 == null? (I believe this is called isolating a reference)

Mihai Fonoage
This is because when calling the go() method, you are passing a copy of the reference variable c2, not the c2 reference variable itself, nor the object that c2 points to. This is why the object that c2 refers to is not yet ready to be garbage collected. Furthermore, in the go() method you are not creating any new object, so c3 never actually pointed to an object. Basically, c1 (together with the Short object) would be GC.

Mihai Fonoage
To be honest, I expected this code to give you an ArrayIndexOutOfBounds exception due to the fact that at some point you will have "arr[5] = 0". Are you sure this is the right code for the answer you provided?

Mihai Fonoage
As Sagar mentioned, the problem is that in the BLBeck constructor, an implicit call to super is being made, but since the super constructor Vict() is not visible, to avoid a compilation error, you must either make it visible by changing its access control level to default, protected or public, OR by explicitly invoking another constructor.

Mihai Fonoage