aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K&B page 568 minor bugs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "K&B page 568 minor bugs" Watch "K&B page 568 minor bugs" New topic
Author

K&B page 568 minor bugs

Marius Paraschiv
Greenhorn

Joined: Apr 07, 2008
Posts: 8
In the table 7-4 there are listed some methods from java.util.Arrays and java.util.Collections, and some of them have the access modifier and some of them not. All the methods should be marked as public.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

You might want to check the errata. I am not sure if this is listed there but it would sure be of help to you.

I cant remember the link though Search this forum and you will find people who have provided the errata link


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Bhushan Chhajed
Greenhorn

Joined: Dec 20, 2007
Posts: 29
I went through the javadoc 6.
All the methods including those which are not declared as public are actually, public!
The asList, binarySearch or equals in Arrays are all public.
Similar is the case with methods of Collections class.


SCJP 6 failed - 48% - 28/06/2008

"In great attempts, it is glorious even to fail. - Cassius Longinus"
Marius Paraschiv
Greenhorn

Joined: Apr 07, 2008
Posts: 8
@John Meyers

Before I have posted this, I have looked at this errata and this is not on the list. Is there any new errata list ?

@Bhushan Chhajed

Arrays and Collections are utility classes and they must mark their api methods as public to be accessible by any class. Don't mistake utility classes with interfaces, where you don't have to type public abstract in front of the methods. I have looked even in the source code of the JDK(I'm using 1.5.0_15) and of course the methods are marked public.


Another little typo is on the page 610:

The generics type identifier can be used in class, method, and variable declarations:
class Foo<t> { } // a class
T anInstance; // an instance variable
Foo(T aRef) {} // a constructor argument
void bar(T aRef) {} // a method argument
T baz() {} // a return type
The compiler will substitute the actual type.

"t" must be "T"

[ July 06, 2008: Message edited by: Marte Marte ]

[ July 06, 2008: Message edited by: Marte Marte ]
[ July 06, 2008: Message edited by: Marte Marte ]
Bhushan Chhajed
Greenhorn

Joined: Dec 20, 2007
Posts: 29
Originally posted by Marte Marte:
[QB@Bhushan Chhajed

Arrays and Collections are utility classes and they must mark their api methods as public to be accessible by any class. [/QB]

Have I said something else?
Marius Paraschiv
Greenhorn

Joined: Apr 07, 2008
Posts: 8
Sorry, I have misunderstood your first response, my fault.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: K&B page 568 minor bugs