I was wondering what to keep access levels of classes and methods? For example in my fbn.client package, do I need to make the FBNClient class package level or public? I was leaning toward the latter as then it cannot be accessed outside its package. Also server classes like IMPL's etc, do they need to be public? You see I am too used to using public all the time that i hate to think of package but that is the right way to go.
Never be satisfied with anything less than the best and you will surely pass the test...
Joined: Jan 15, 2002
Also whats the point in having public methods, if the class itself is given package access?
I think that is a good question. I made sure that all my instance variable were private, and if I needed any of them that I would include a public method that would return the value. As far as making the methods public, I think that package is good, but what if you want to extend some other new application and use the classes there. Or actually thinking about it my DataAccessFacade was part of my db package and not my client package, even though the client used it to pass calls to the data class. So if they were package then the client could never call them. Mark
All I want is to win the Lotto. Is that asking too much? Of course not. Mark what a cool signature! I have not seen such a cool one, but seen a lot as follows. XXXXXXXXXXXXXXX(My Good Name) THEN SUN Certified Programmer For The Java 2 Platform SUN Certified Web Component Developer For The Java 2 Platform SUN Certified DeveloperFor The Java 2 Platform SUN Certified Architect For The Java 2 Platform BLAH,BLAH,BLAH,
A long tail after their name then their posting. I could not say anything even though I did not like it. Everybody knows certified people or who want to certify roam around JavaRanch. I know, they are certified and they have full right to express it as RESUME all the time. I am mouthy, it is really bad. But I liked yours. GOOD LUCK! It was being unnoticed here. Just I wanted to draw the attention. I am sorry being off the track during public and private parade. -Bal