Panos Liaskos

Ranch Hand
+ Follow
since Jul 28, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Panos Liaskos

Frans, Barry thanks for your replies,

I can't remember if I was given a voucher when I purchased for the SCJD assignment. (I remember getting one for SCJP)
I looked at certmanager.net and I still have access to the download/ upload area for the assignment exam.
Anyway, I am going to check whether I recieved a voucher or not.

Thanks.
Hi,

In October 2003, I registered for the SCJD and I was assigned to develop B&S (2.2.2)
Since then, I haven't been able to start the project.
I just wonder if I can go on with this project, or do I have to register again for the exam?

Thanks for any help.
Congratulations !!!
21 years ago
For the exam just note on Jose's excellent (and enlighting) example that System.gc(); has no guaranteed behavior.
Lets see the hole code:

Thats what I think is happening:
1. after takeObject method completes: 1 object eligible for GC (the one referenced by obj local reference variable).
2. after test method completes: another 1 object eligible for GC (referenced by o local reference variable)
3. so after t.test() returns: 2 eligible objects.
4.next line is: t=null; Another object (of type Test) eligible for GC (referenced by t reference variable)
5. so when this line completes you have: 3 objects eligible for GC.
Jack,
I don't think that the object referenced by the o reference variable is eligible for gc.
The only object that is eligible for gc is the one referenced by the obj reference variable (line: obj = new Object() .
After the method completes the local method reference variable obj is out of scope (so it doesn't exist outside the scope) but there is still in memory the object that it refers. That object is eligible for GC.
Well, don't be scared.
What Kathy and Bert say at ch01 summary is true:
"... this was the toughest chapter and it�s all downhill from here..."
The rest of the book is easier to read and with a great sence of humor.
The writers enjoyed a lot writing it and you will find yourself just love the language.
If you pass all the chapters seriously you will be able to reread the hole book in a weekend.
You will find more than helpful TMD - EW - STs sections. (the last thing to read before the exam)
I didn't use any other source (except javaranch of course ) and the only experience I had was just javascript.
I am sure you can pass the exam in 2 months but if you want to score above 90% you will need to study more.
Good Luck.
Well here is my story:
1. I almost run out of time (I had 2 minutes left and 4 questions to answer )
2. Studied about 4 months (well, 2 of them seriously)
3. Book: K&B
4. Mock Exams: Sorry to say that, but: None. Not even the K&B CD Exam.
I found extremely useful K&B chapter's Self Tests, though, which now I think that they are more difficult than the ones in the real exam.
Section Analysis/Questions:
Declarations and Access Control: 75% (about 8 questions)
Flow Control, Assertions, and Exception Handling: 55% (about 7)
Garbage Collection: 100% (about 6)
Language Fundamentals: 70% (about 7)
Operators and assignments: 50% (about 6)
Overloading, Overriding, Runtime Type and Object Orientation: 83% (about 6)
Threads: 75% (about 7)
Fundamental Classes in the java.lang package: 83% (about 8)
The Collections Framework: 66% (about 6)
Overall I think that the exam was not difficult. I just needed to study more.

I would realy like to thank Kathy and Bert for their excellent book.

Thanks.
21 years ago


Can someone please enlighten me as why SUn chose to over-ride ...


1. Maybe, it has something to do with the imutability/ mutability of String/ StringBuffer.
2. Why SUN choose to override String's equals and not StringBuffer's? Why not Both?
Well, examine the available constructors for these classes:
String()
String(byte[] bytes)
String(byte[] bytes, int offset, int length)
String(byte[] bytes, int offset, int length, String charsetName)
String(byte[] bytes, String charsetName)
String(char[] value)
String(char[] value, int offset, int count)
String(String original)
String(StringBuffer buffer)
StringBuffer()
StringBuffer(int length)
StringBuffer(String str)
Which one you would choose?


1. Is it not pssible to directly go to a Prometric center and register ?


The authorized prometirc center I contacted told me that they needed a voucher and they couldn't get one for me from SUN. So, I needed to contact SUN first.


2. How late can the registration be done ?


I think the only limit is the voucher itself as it expires after 4 months.
You need to purchase the voucher through SUN.
www.sun.com/worldwide/
Contact Sun Microsystems office in your area.
Then contact an authorized prometric center in your area and register.
www.2test.com
Marlene,
The only way I can get through this is the fact that there is always only one copy of the variable, marked with the static modifier, for the class or the subclasses instances.
So, any manipulation by any subclass would not break the contract.
Marlene,
Thanks for your replies.
You have been very helpful.
Thanks
Hi Vicken,
what I mean is:
1. the above code compiles
2. if compiled with line 3 of pac2 package as:
protected int b;
compilation fails (expected),
and the output is: b has protected access in pac2.classB

My question is why is this happening?
Why if you mark int b as static we have no error about the protected modifier?
Thanks