Ahmed Khan Mohammed

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

Recent posts by Ahmed Khan Mohammed

Congratulations Calson, good score.
17 years ago
Hi Hetal,
I think the price of the book is nothing when compared to the knowledge which you gain by reading it. Specially K&B which is a god book for SCJP 5. Please purchase a copy of the book and appreciate the authors for their efforts in writing such a great book, so that they write another such great book.

Regards and sorry.
17 years ago
int[] a = null , b [] = null; //line 1
b = a;
System.out.println( b );

line 1 places [] immediately after the datatype declaration, so all variables declared on the same line after the "," will be an int[]. So in above case b=a will not compile but the following will
int c[][] = b;

If you put the square brackets after the variable name like int a[] then line 2 will compile.

As an example consider the following, will it compile? If yes then what will be the datatype of d.

int a[] = null , b [] = null, d;
That's incredibly great. Thanks for sharing you preparation details.
17 years ago
Thats because the variable j is non static and cannot be accessed from a static context.

Followup to the comment :
An abstract class can contain static methods.
Congratulations and best of luck.
17 years ago
Congratulations and best of luck.
17 years ago
The declaration
GenericP<? extends Number> gp
says that anything can go in this gp which passes the "is a" test for Number. You created the class GenericP to hold only Integer (new GenericP<Integer> , if the method call gp.aMethod would have succeeded then anything which is a Number could be passed to that method which is supposed to accept only Integer and all your type safety will be lost, to avoid such situation the above code is illegal. Following is just a variation of the declaration
GenericP<? super Number> gp = new GenericP<Number>();
gp.aMethod(new Integer(5));
gp.aMethod(new Double(5));
in which case your type safety is assured and the compiler is also happy.

Hope I am clear.
Congratulations and best of luck.
18 years ago
It depends on how you implement the Comparator interface, suppose you say
implements Comparator<Pet> then you must implement
public int compare(Pet p1, Pet p2)
and if you implement just Comparator without the <Pet> then
you must implement
public int compare(Object tc1, Object tc2)

Hope that helpl.


5.(unclear) Can the examinee choose the questions to answer in its own sequence back and forth? e.g. there're questions from 1 to 10, can I choose the friendly questions 2,4,6,8,10 to answer firstly, then resort to the aweful rest ones?



You can mark the questions which you have not answered or the questions which you have doughts and come back to them later.
There is an Item review at the end of the last question which displays you the questions you have marked so you can review them and make any modifications.
The questions of type arrange code blocks will have to be answered again if you try to modify them, but I got an alert that the answer will be lost before doing so.

Hope the point is clear.
When I ran the program I dont see any output. It just happened (on my machine) that the notify method was called before the wait method was called.
I modified the code.


The output is
after notify
going to wait
First of all thanks to (in no particular order):
Kathy Sierra and Bert Bates for their excellent book.
Paul Sanghera for his excellent book.
LearnKey for their practice exam that comes with the first book above.
JavaBlackBelt.com for their J2SE core exams.
--------------------------------------------------------

Hi folks, I am a Java/Oracle developer from India currently working in UAE.
I have five years of Java development experience. I also hold SCJP 1.2 certification (cleared in february 2002 with 84%).

Cleared 1.5 exam on 6th of December 2006 with 69 correct answers out of 72.

Here is the breakdown of scores topic wise :
Declarations, Initialization and Scoping - 100%
Flow Control - 100%
API Contents - 100%
Concurrency - 87% (questions in this area are really tough)
OO Concepts - 80% (did some silly mistakes here)
Collections/Generics - 100%
Fundamentals - 100%.

The preparation I did :
Read Kathy's book twice, read the two minute drill four times.
Read Paul's book once.
Took the LearnKey practice exam that comes with Kathy's book , this exam is good, worth taking it.
Cleared all the J2SE exams on JavaBlackBelt.com.
Posted some questions on JavaBlackBelt.com which really helped me enforce the meterial which I learned.
Read nothing a day before the exam nor thought about any of the topics, had a nice sleep the night before the exam.

Following might be helpful to those preparing for the exam :
There are mostly code oriented questions rather than theory oriented.
A lot of questions(around 10 of them) fall in the fill in the code blocks category, which requires you to have a good understanding of not only java but also programming logic. The questions are really tricky you have to read it carefully twice/thrice before making any choices. There is ample time 2 hours and 55 minutes so dont worry about the time just concentrate on the questions.

Some questions assume that you know the values of certain constant variables , for example a question assumed that I know the values of Math.PI and Math.E.

The questions on threads are the most difficult one, concentrate more on this topic experiment a lot with code, try out new ideas.

Some questions are tricky, for example a question assumed that I know a Rectangle is a Square/Rectangle has a side.

------------------------------------------------------

With 100% preparation effort one can score 90%, it is the last 10% score that requires an extra 100% effort from you, may be I have put only 150% effort so I got 95% . I believe that a score of 100% is achievable and I wish best of luck for others to get the same.

Regards,
Mohammed Ahmed Khan
18 years ago