Is there any good use for a default Java class (i.e. non-public, non-abstract, non-final, subclass of Object) -
i've been programming in c , c++ few years , taking java classes first time. i've come across chapter on java classes , curious default declaration java class:
class myclass {
//vars , methods
}
this compiles i'm told, have practical usage, such in particular design patterns or applications?
if matters, java 6. old, know, project @ work built on java6 , that's motivating me learn this.
the default access in java package private. means class visible other classes in same package.
it useful, example, if write library , want prevent users of library directly using internal classes not part of api. allows change internal classes in later versions without having worry backward compatibility.
Comments
Post a Comment