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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -