Created
December 23, 2018 22:04
-
-
Save phoenix24/413916959525b3b5efe4199b81f2fb02 to your computer and use it in GitHub Desktop.
java playground - tell me output?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SP13 { | |
| static class R extends Thread { | |
| @Override | |
| public synchronized void start() { | |
| System.out.println("in start, t:" + Thread.currentThread().getName()); | |
| } | |
| @Override | |
| public void run() { | |
| System.out.println("in run, t:" + Thread.currentThread().getName()); | |
| } | |
| } | |
| public static void main(String[] args) { | |
| R r = new R(); | |
| r.start(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment