Darren McLeod

Greenhorn
+ Follow
since Jul 07, 2003
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 Darren McLeod

Studied for a month with Head First EJB book, EJB 2.0 spec and http://www.ejbcertificate.com/ exam simulator.
17 years ago
Hi Andrew, thanks for the advice. I think I will get SCWCD, SCBCD next because I am trying to impress my boss before my annual review in September Then I�ll do SCJD and while I�m waiting for the results of my assignment I�ll do the SCEA. I thought about the �confusion� of doing programming and architect paths but for me I am not a new programmer. I work for a consulting firm so depending on the work available we can submit a programming resume or an architect resume. Plus I really like the idea of the SCJD assignment and will be doing it more for my own satisfaction than for impressing potential clients.
I tried searching for info on this but couldn't seem to find it anywhere. If one is planning on taking the SCJD, SCWCD, SCBCD and SCEA exams, Is there any general consensus on which order would be better to take them in? Or are there really no reasons to take one before the other and just do them in any order?
Just passed SCJP 1.4 with 85%. Studied the Mughal-Rasmussen book. Studied stuff here at the ranch. Did all the paid exams on the www.javacertificate.com website. Did the www.javacertificate.com exclusive final exam right before the actual test and only got 66% due to rushing and making dumb mistakes. But that got my brain working and was much more careful on the actual exam and did much better.
17 years ago

Originally posted by Maulin Vasavada:
hi Priyanka
difference between native and reserved word
i assume u meant- difference b/w keyword and reserved word.
1. keyword word - u can use it as variable names
e.g. String. u can say,
String String = new String("Priyanka");
2. reserved word - u can't use it as variable names
e.g. u can't say,
int for = 0;
u get it?
regards
maulin


Maulin, String is not a keyword. Keywords are reserved and cannot be used as variable names.
JLS 3.9 Keywords
I think I see where you got confused with this line "The keywords const and goto are reserved, even though they are not currently used. " This is not saying that const and goto are the only reserved words, it is saying that they are the only reserved words that are not currently used. All keywords are reserved words.
Just to clarify, putting an abstract modifier on a constructor will result in a compiler error.
change
D c4 = new C();
to:
A c4 = new C();
and you will get the AAA result he describes. Cyril posted another thread describing this effect.
[ July 17, 2003: Message edited by: Darren McLeod ]

Originally posted by Corey McGlone:
Yeah, it probably should have been ?:, not just ?.


The JLS says ? is an operator by itself and : is also an operator by itself. So just ? is valid.
Here is the reference:
JLS Operators
Is the answer C and D?
Wow, thanks for the example. I would never have realized such an occurance could happen. I had to compile and see it to believe it.

Originally posted by Alexandre Ferras:
Darren,
not all legal uses of assertions are considered appropriate.
According to Kathy Sierra, Bert Bates book:
E. Don't handle AssertionErrors with a try-catch block.
"AssertionError is a subclass of Throwable, so it can be caught. To discourage you from trying to substitute an assertion for an exception, the AssertionError doesn�t provide access to the object that generated it. All you get is
the String message"
D. Don't use assertions to verify the arguments of public method:
"A public method might be called from code that you don�t control (or have ever seen). Since assertions aren�t guaranteed to actually run (they�re typically disabled in a deployed application), the enforcement won�t happen if assertions aren�t enabled"


I see, so E and D are TRUE "SUN recommended" statements. Thanks for the clarification.
Thanks Anupam Sinha for the link it was very helpful.

Originally posted by Alexandre Ferras:

E. Don't handle AssertionErrors with a try-catch block.
FALSE - AssertionErrors should never be handled


Don't you mean TRUE? I don't think statement E is saying you should handle AssertionErrors.


D. Don't use assertions to verify the arguments of public methods.
CORRECT - see above


I haven't studied assertions that much, why use assertions to verify the arguements of private methods but not public methods?
I did the same thing as you my first time, you need to get the JDK for the javac compiler.
[ July 09, 2003: Message edited by: Darren McLeod ]
My compiler(JDK 1.1.3 on SunOS 5.6) doesn't accept any of them: