Quantcast
Channel: User La-comadreja - Stack Overflow
Viewing all articles
Browse latest Browse all 38

Answer by La-comadreja for differences between log and logger

$
0
0

The fundamental difference is not in the names log and logger (they are different names for a variable of the same type and initialized in the same way, but in this:

public static final Log logger;private final Log log;

Being final, which both are, they cannot be modified once initialized.

However, private means that the variable is only accessible within the class. The public modifier means that the variable is accessible to all classes that imported or are within the package.

When an object is static, like logger, there is one value for the entire program; when it is not, like log, it is instantiated with each instance of the object.


Viewing all articles
Browse latest Browse all 38

Latest Images

Trending Articles





Latest Images