Skip to content

Instantly share code, notes, and snippets.

@phoenix24
Created December 23, 2018 22:04
Show Gist options
  • Select an option

  • Save phoenix24/413916959525b3b5efe4199b81f2fb02 to your computer and use it in GitHub Desktop.

Select an option

Save phoenix24/413916959525b3b5efe4199b81f2fb02 to your computer and use it in GitHub Desktop.
java playground - tell me output?
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