Joel McCotter

Greenhorn
+ Follow
since Apr 29, 2003
Merit badge: grant badges
For More
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 Joel McCotter

It doesn't matter which gender is more intelligent. The world revolves around women anyways. They embody life, hence they're the ones really in control. Any guy who tells you differently is deluding himself. (I say this and I'm a guy, just a secure one)
20 years ago
Excellent! Thanks Kathy, exactly what I needed to know. Thanks for writing a (dare I say) fun Java cert book too.
Joel McCotter
Just looked at the book. What looks like the closing brace on the for statement is actually the closing brace for the main method. All is well on that question.
Thanks again for the info. If anybody has some more thoughts on the question in chapter two, feel free to chip in.
Joel McCotter

Originally posted by Roger Chung-Wee:
Private is more restrictive than default.


Sorry, didn't clarify. The question asked to pick the most restrictive modifier that allowed package level access. Once again, don't have the book in front of me, but I don't think private was even an option (and it wouldn't be correct in this case regardless)
[ April 30, 2003: Message edited by: Joel McCotter ]

Originally posted by Rory French:

No, this code compiles just fine. If a loop statement such as for does not have an opening brace, then the next statement, and only the next statement, is evaluated as part of that loop. In this particular question, the next statement is another for loop.


Well, I don't have the book on me right now (I'm at work), but I think I remember that there was no opening brace, but there was a closing brace further down. Is this ok? (I guess I shouldn't ask unless I have the book in my hand)

I think you do maybe have a point here. The authors did put the words "default access" in a different font to distinguish it from the access modifiers, but perhaps the word "modifier" should have been omitted from the question, especially since the anwer was not a modifier.


In this case I personally feel it's more than just a case of semantics. If, as the book says, there are 4 access levels, and 3 access modifiers (since "Default Access" is implicit), then any questions asking to pick an "access modifier" should not have "Default Access" as the answer. If not, then what's the point of making the distinction in the first place?
But, regardless, I don't want to hold this stance if the exam feels differently.
Thanks again,
Joel McCotter
[ April 30, 2003: Message edited by: Joel McCotter ]
Hi, my apologies if this has been covered elsewhere, but I was unable to uncover anwers to my questions with the forum search.
I have a couple of questions regarding possible typos / errors in the Self Tests.
1. Chapter 1, Question 11, Line 8
There are no opening braces on that for () statement. I would be correct in assuming the book is wrong and the correct answer will be "E. Compilation Fails"?
2. Chapter 2, Question 1
The book goes out of its way to make a distinction between "access control levels", and "access modifiers". It says that "Default Access" is a level, but not a modifier (since it is not explicitly assigned in a class / method declaration). This question asks for the most restrictive "access modifier", and lists "default access" as the answer, as the "'package oriented' access modifier". I answered "C. Protected" based on a strict interpretation of "modifier" (can't get too wishy washy with interpretation of the rules when a compiler is the final judge ).
So for the sake of the exam, should we treat "default access" as an access modifier (though technically that seems incorrect)?
Thanks for your help in advance, and if either of the authors read this, thanks for the great book.
Joel McCotter
[ April 29, 2003: Message edited by: Joel McCotter ]