Which one demonstrate the valid usage of the keyword synchronized?
A.
abstract class ThreadSafe { synchronized abstract void doIt(); }
B.
class ThreadSafe { synchronized static void soIt () {} }
C.
enum ThreadSafe { ONE, TWO, Three; synchronized final void doIt () {} }
D.
interface ThreadSafe { synchronized void doIt(); }
Why C
“enum ThreadSafe { ONE, TWO, Three; synchronized final void doIt () {} }”
not Valid?
B、C