Created
December 23, 2018 22:07
-
-
Save phoenix24/9f6195ca19d7e61783a0f55937b2b48a 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
| package io.zapscanner.admin; | |
| public class SP14 { | |
| 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(); | |
| Thread t = new Thread(r); | |
| t.start(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment