if i want to create a class that can not be inheritance by another class. wich one is better : (use private constructor or final clas)
class one
{
private one() {}
}
or
final class one
{
one() {}
}
why, we always use use final ? i know that use private can do the same thing
so any body know, what is the advantages if we use choise number one (use private contructor ) ?