{"action":"created","issue":{"url":"https://api.github.com/repos/STIW3054-A172/Main-Issues/issues/11","repository_url":"https://api.github.com/repos/STIW3054-A172/Main-Issues","labels_url":"https://api.github.com/repos/STIW3054-A172/Main-Issues/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/STIW3054-A172/Main-Issues/issues/11/comments","events_url":"https://api.github.com/repos/STIW3054-A172/Main-Issues/issues/11/events","html_url":"https://github.com/STIW3054-A172/Main-Issues/issues/11","id":314466461,"number":11,"title":"Exercise_10","user":{"login":"zhamri","id":24503750,"avatar_url":"https://avatars3.githubusercontent.com/u/24503750?v=4","gravatar_id":"","url":"https://api.github.com/users/zhamri","html_url":"https://github.com/zhamri","followers_url":"https://api.github.com/users/zhamri/followers","following_url":"https://api.github.com/users/zhamri/following{/other_user}","gists_url":"https://api.github.com/users/zhamri/gists{/gist_id}","starred_url":"https://api.github.com/users/zhamri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhamri/subscriptions","organizations_url":"https://api.github.com/users/zhamri/orgs","repos_url":"https://api.github.com/users/zhamri/repos","events_url":"https://api.github.com/users/zhamri/events{/privacy}","received_events_url":"https://api.github.com/users/zhamri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-04-16T00:19:25Z","updated_at":"2018-04-17T04:46:40Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Write a Java program using threads to count numbers from 100 to 1000 which consist of number “5”. If the number is “555” then stop all the threads."},"comment":{"url":"https://api.github.com/repos/STIW3054-A172/Main-Issues/issues/comments/381839412","html_url":"https://github.com/STIW3054-A172/Main-Issues/issues/11#issuecomment-381839412","issue_url":"https://api.github.com/repos/STIW3054-A172/Main-Issues/issues/11","id":381839412,"user":{"login":"syaba314","id":36690081,"avatar_url":"https://avatars2.githubusercontent.com/u/36690081?v=4","gravatar_id":"","url":"https://api.github.com/users/syaba314","html_url":"https://github.com/syaba314","followers_url":"https://api.github.com/users/syaba314/followers","following_url":"https://api.github.com/users/syaba314/following{/other_user}","gists_url":"https://api.github.com/users/syaba314/gists{/gist_id}","starred_url":"https://api.github.com/users/syaba314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syaba314/subscriptions","organizations_url":"https://api.github.com/users/syaba314/orgs","repos_url":"https://api.github.com/users/syaba314/repos","events_url":"https://api.github.com/users/syaba314/events{/privacy}","received_events_url":"https://api.github.com/users/syaba314/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T04:46:40Z","updated_at":"2018-04-17T04:46:40Z","author_association":"NONE","body":"```java\r\nimport java.util.concurrent.Semaphore;\r\n\r\n/**\r\n *\r\n * @author NUTSYABA\r\n */\r\npublic class issue10 extends Thread {\r\n\r\n    public int name;\r\n    final Value v;\r\n    final Semaphore lock;\r\n\r\n    public issue10(Value v, Semaphore lock) {\r\n        this.v = v;\r\n        this.lock = lock;\r\n    }\r\n\r\n    public void run() {\r\n\r\n        for (v.i = 100; v.i <= 1000; v.i++) {\r\n            if (v.i % 10 == 5) {\r\n                System.out.println(v.i);\r\n                if (v.i == 555) {\r\n                    break;\r\n                }\r\n            }\r\n\r\n        }\r\n    }\r\n\r\n    public static void main(String[] args) {\r\n        Value v = new Value();\r\n        Semaphore lock = new Semaphore(1);\r\n        issue10 a = new issue10(v, lock);\r\n\r\n        a.name = 1;\r\n\r\n        a.start();\r\n\r\n    }\r\n\r\n    static class Value {\r\n\r\n        int i = 1;\r\n    }\r\n}\r\n```\r\n<img width=\"376\" alt=\"3\" src=\"https://user-images.githubusercontent.com/36690081/38849146-53e1166e-423d-11e8-8e08-1b49405efb12.PNG\">\r\n<img width=\"323\" alt=\"4\" src=\"https://user-images.githubusercontent.com/36690081/38849147-5415c15c-423d-11e8-9477-32e7f953686c.PNG\">\r\n"}}
{"actor":{"display_login":"syaba314"}}