Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
123456789101112131415161718192021 |
- // Subject to LTW
-
- public class BasicProgram1 {
-
- public static void main(String[] args) {
- new BasicProgram1().nonstaticM();
- staticM();
- }
-
- public static void staticM() {
- synchronized (String.class) {
- System.err.println("static method running");
- }
- }
-
- public void nonstaticM() {
- synchronized (this) {
- System.err.println("nonstatic method running");
- }
- }
- }
|