Chaitanya Lele

Greenhorn
+ Follow
since Dec 23, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Chaitanya Lele

Congrats
Keep up the good work
15 years ago
Hi all

I successfully cleared SCJP 6 on 25th March 2009 in Mumbai India
I have since recieved the score copy, official certificate etc

However when I try to create a new user first time login on the Sun Certification DB site at the following url

Cert DB

I find that it says that no user was found matching the entered criteria

I hav entered the relevant details (Prometric Id, Centre Code etc) right of the score sheet..

Any idea as to what I could do to see my record in the Sun Certification DB

Also I was wondering that since SCJP is a prerequisite for other exams like SCWCD,SCBCD etc, while registering for these exams how does Sun verify that the candidate concerned has actually cleared SCJP?

Thus should I wait before this issue gets resolved before registering for SCWCD?

Any help is appreciated..
Thanks
15 years ago
Hi all

I tried the following jsp file with Netbeans 6.5 IDE and Glassfish v2 server




I get a compiler error saying

According to TLD or attribute directive in tag file, attribute value does not accept any expressions

I get no errors if dont use el. the app deploys well and runs perfectly fine

Any help or suggestions are appreciated

Thanks
Thanks to all....

Ankit I dont really want to divulge any real exam questions....
Just wanted to highlight the fact that you have to read the given code snippet very very carefully...

Himanshu, The exam is not so difficult really....

A thorough understanding of K&B is more than enough to clear the exam....

Just try to avoid many 'gotchas' and convince yourself that the given code will firstly compile and secondly not through any runtime exception before diving into the logic of the code......

Also with 3.5 hrs(210 mins) there is more than enough time.

One last thing dont review drag n drop questions if you are sure about your answer. The answer WILL be reset when you review it. If you are not, note down any partial answers that you are certain about since they too will be reset.

PS: I dont know whether this behavior about Drag n Drop questions is default,but it was so at my exam center.(My exam center was in Mumbai,India.)
15 years ago
Hey all,
Just cleared SCJP 6 with 80%....

Have to say that the exam wasn,t really that tough (especially the 'marquee' topics like Threads n Generics)....
Also there were many questions that really required you to read the question carefully....

ie like



Notice the missing static keyword in the main() function definition

Anyways thanks to all Ranchers out there
Also a big thanks to Kathy Sierra n Bert Bates for writing an excellent book

Also to others who have already recieved their certificates, are there any formalities left on my side wrt the cerfificate/ results db etc before I can put my feet up and relax
15 years ago
Congrats man!!!
Keep up the good work
15 years ago
Hi
Am using both books...

I honestly feel that the K&B book is better to begin with and understand the concept mainly because the text isn't written like a 'textbook' (Thank God for that ) and the examples are more intuitive.

That said however the range of questions(both number and type) in the Khalid Mughal book is better/broader than K&B.

So IMHO I guess its better to start of with K&B and then move onto the Khalid Mughal book for the questions. At least that's what I am doing anyway.

(Well we'll see how good a strategy that is after my SCJP on Monday )
Thanks all

Dumb error on my part
Forgot that Strings are immutable...

Got to avoid those kind of errors in the SCJP on Monday
Hi all

I have this question from A Programmer's Guide to SCJP Certification by Khalid Mughal et al Q# 9.12

What scenario can be the result of compiling and executing the following code -


Select the 2 correct answers -
a - The program may print AB
b - The program may print BA
c - The program may print A
d - The program may print B
e - The program may print nothing

Their answer : c & e
My answer : a & e

Option e is definitely correct as the GC may not run at all.

However how the anonymous MyClass object is GCed before the concat() method is invoked is beyond me. Thus i think that option A is more plausible that option C

Also Option D is false since the anonymous String object " World" invokes the finalize() method of String class and not of the MyClass class. Correct me if I am wrong.

Thanks

Thanks a lot Ankit
Got it now
Hi all

I tried the code on the command line and it failed to compile because of name clash..

i read the previous discussion on this very topic and the implications of type erasure etc and seem to have got it.

Just want to know if my summing up of rules regarding <? extends T> and <? super T> are correct.

Sorry for re-posting the same topic.

Thanks
Hi all

This code is from Niko's SCJP Mock Tests (Generics) Q#48


Question is will the above code compile ? yes/no
the answer given is No

However when I tried the following piece of code on my machine it worked perfectly well



The output was
parent
child
child

ie the method void say(List&lt;T&gt;) was working like a normal overridden method with runtime polymorphism....

so what gives? is there a typo on the website or what...

BTW I am using Netbeans 6.5 and haven't tried compiling it from the command line.. dont know it that could make a difference...

Also one other thing...
given a collection like List&lt;? extends T&gt; list where T is some concrete type -

Case 1: Retrieving an element from the collection
Here we are 100% sure that whatever is returned from the collection IS-A T(ie passes the instanceof test for T). Thus the only object reference that can be on the left hand side of the statement list.get(0) is of type T.Nothing else will do for the compiler irrespective of whether it is legal at runtime or not.

Case 2 - Adding an element to the collection
Not possible in this case since there is nothing equivalent to an ArrayStoreException for typed collections. Thus the compiler forbids any modification whatsoever.


However given a collection like List&lt;? super T&gt; list where T is some concrete type -
Case 1: Retrieving an element from the collection
Here we are 100% sure that whatever is returned from the collection IS-A Object(ie passes the instanceof test for Object). Thus the only object reference that can be on the left hand side of the statement list.get(0) is of type Object.Nothing else will do for the compiler irrespective of whether it is legal at runtime or not.

Case 2 - Adding an element to the collection
Here we can add elements of type T only because a collection typed with type X can accept subtypes of X(direct as well as indirect) as elements.

Also &lt;?&gt; is equivalent to &lt;? extends Object&gt; and hence follows the above rules for extends.
Of course null can be added to the collection in both cases.

Just want to know if my observation is right...
please clarify me if i have missed something or have a misconception..

Thanks in advance
Thanks a lot Henry and Vishwanath
Oh ok
I think I get it now...

Correct me if I am wrong -

When the first wrapper reference variable is declared, a wrapper object is instantiated with an implicit call to new like
Subsequently any Integer reference variable will point to the same object that ( in this case a refers to) if they have the same value...
unless of course it is explicitly instantiated like

Not really...
the example given is


this produces the output

same object
meaningfully equal

and what follows is the above statement about behavior of == for some wrapper objects.

So unless I am missing something the explanation in K&B has to be wrong.