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
Originally posted by Corey McGlone:
Yeah, it probably should have been ?:, not just ?.
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"
Originally posted by Alexandre Ferras:
E. Don't handle AssertionErrors with a try-catch block.
FALSE - AssertionErrors should never be handled
D. Don't use assertions to verify the arguments of public methods.
CORRECT - see above