Why synchronized method is not included in interface

Because synchronized is an implementation detail. One implementation of the method might need to make the method synchronized, whereas another one might not need it. The caller doesn’t care whether the method is synchronized or not. It’s not part of the contract, which tells what the method does. Which synchronization technique, if any, is used to fulfill the contract is irrelevant.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)