Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TroublingRankBugs {
- private void sync() {
- synchronized (this) {
- }
- }
- private void sleep() throws InterruptedException {
- synchronized (this)
- {
- Thread.sleep(5000);
- }
- }
- public static void main(String[] args) throws InterruptedException {
- TroublingRankBugs instance = new TroublingRankBugs();
- instance.sync();
- instance.sleep();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement