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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -