{"action":"created","comment":{"url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/comments/30681165","id":30681165,"diff_hunk":"@@ -0,0 +1,30 @@\n+package task17;\n+\n+//Имеется строка с текстом. Подсчитать количество слов в тексте.\n+// Желательно учесть, что слова могут разделяться несколькими пробелами,\n+// в начале и конце текста также могут быть пробелы, но могут и отсутствовать.\n+public class WordCounter {\n+\n+    public int calculateWords(String str) {\n+        char symbol = ' ';\n+        int counterWords = 0;\n+        for (int i = 0; i < str.length(); i++) {\n+            symbol = str.charAt(i);","path":"zolotuho/src/task17/WordCounter.java","position":12,"original_position":12,"commit_id":"a7eae0b0847cb72c0815b3880c57b98ffcb5851a","original_commit_id":"a7eae0b0847cb72c0815b3880c57b98ffcb5851a","user":{"login":"karzhouAndrew","id":9786654,"avatar_url":"https://avatars.githubusercontent.com/u/9786654?v=3","gravatar_id":"","url":"https://api.github.com/users/karzhouAndrew","html_url":"https://github.com/karzhouAndrew","followers_url":"https://api.github.com/users/karzhouAndrew/followers","following_url":"https://api.github.com/users/karzhouAndrew/following{/other_user}","gists_url":"https://api.github.com/users/karzhouAndrew/gists{/gist_id}","starred_url":"https://api.github.com/users/karzhouAndrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karzhouAndrew/subscriptions","organizations_url":"https://api.github.com/users/karzhouAndrew/orgs","repos_url":"https://api.github.com/users/karzhouAndrew/repos","events_url":"https://api.github.com/users/karzhouAndrew/events{/privacy}","received_events_url":"https://api.github.com/users/karzhouAndrew/received_events","type":"User","site_admin":false},"body":"объявлять переменную в данном случае лучше в рамках цикла","created_at":"2015-05-20T08:43:30Z","updated_at":"2015-05-20T08:43:30Z","html_url":"https://github.com/karzhouAndrew/JavaRepository/pull/330#discussion_r30681165","pull_request_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330","_links":{"self":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/comments/30681165"},"html":{"href":"https://github.com/karzhouAndrew/JavaRepository/pull/330#discussion_r30681165"},"pull_request":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330"}}},"pull_request":{"url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330","id":35082212,"html_url":"https://github.com/karzhouAndrew/JavaRepository/pull/330","diff_url":"https://github.com/karzhouAndrew/JavaRepository/pull/330.diff","patch_url":"https://github.com/karzhouAndrew/JavaRepository/pull/330.patch","issue_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/issues/330","number":330,"state":"open","locked":false,"title":"17th task","user":{"login":"Zoltanuga","id":12188512,"avatar_url":"https://avatars.githubusercontent.com/u/12188512?v=3","gravatar_id":"","url":"https://api.github.com/users/Zoltanuga","html_url":"https://github.com/Zoltanuga","followers_url":"https://api.github.com/users/Zoltanuga/followers","following_url":"https://api.github.com/users/Zoltanuga/following{/other_user}","gists_url":"https://api.github.com/users/Zoltanuga/gists{/gist_id}","starred_url":"https://api.github.com/users/Zoltanuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zoltanuga/subscriptions","organizations_url":"https://api.github.com/users/Zoltanuga/orgs","repos_url":"https://api.github.com/users/Zoltanuga/repos","events_url":"https://api.github.com/users/Zoltanuga/events{/privacy}","received_events_url":"https://api.github.com/users/Zoltanuga/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-10T12:57:11Z","updated_at":"2015-05-20T08:43:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1af62ba39e7dfd13b6ce08b38e1e8ff30c388e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330/commits","review_comments_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330/comments","review_comment_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/comments{/number}","comments_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/issues/330/comments","statuses_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/statuses/a7eae0b0847cb72c0815b3880c57b98ffcb5851a","head":{"label":"Zoltanuga:task17","ref":"task17","sha":"a7eae0b0847cb72c0815b3880c57b98ffcb5851a","user":{"login":"Zoltanuga","id":12188512,"avatar_url":"https://avatars.githubusercontent.com/u/12188512?v=3","gravatar_id":"","url":"https://api.github.com/users/Zoltanuga","html_url":"https://github.com/Zoltanuga","followers_url":"https://api.github.com/users/Zoltanuga/followers","following_url":"https://api.github.com/users/Zoltanuga/following{/other_user}","gists_url":"https://api.github.com/users/Zoltanuga/gists{/gist_id}","starred_url":"https://api.github.com/users/Zoltanuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zoltanuga/subscriptions","organizations_url":"https://api.github.com/users/Zoltanuga/orgs","repos_url":"https://api.github.com/users/Zoltanuga/repos","events_url":"https://api.github.com/users/Zoltanuga/events{/privacy}","received_events_url":"https://api.github.com/users/Zoltanuga/received_events","type":"User","site_admin":false},"repo":{"id":34864856,"name":"JavaRepository","full_name":"Zoltanuga/JavaRepository","owner":{"login":"Zoltanuga","id":12188512,"avatar_url":"https://avatars.githubusercontent.com/u/12188512?v=3","gravatar_id":"","url":"https://api.github.com/users/Zoltanuga","html_url":"https://github.com/Zoltanuga","followers_url":"https://api.github.com/users/Zoltanuga/followers","following_url":"https://api.github.com/users/Zoltanuga/following{/other_user}","gists_url":"https://api.github.com/users/Zoltanuga/gists{/gist_id}","starred_url":"https://api.github.com/users/Zoltanuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zoltanuga/subscriptions","organizations_url":"https://api.github.com/users/Zoltanuga/orgs","repos_url":"https://api.github.com/users/Zoltanuga/repos","events_url":"https://api.github.com/users/Zoltanuga/events{/privacy}","received_events_url":"https://api.github.com/users/Zoltanuga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zoltanuga/JavaRepository","description":"","fork":true,"url":"https://api.github.com/repos/Zoltanuga/JavaRepository","forks_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/forks","keys_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/teams","hooks_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/hooks","issue_events_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/issues/events{/number}","events_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/events","assignees_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/assignees{/user}","branches_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/branches{/branch}","tags_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/tags","blobs_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/statuses/{sha}","languages_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/languages","stargazers_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/stargazers","contributors_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/contributors","subscribers_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/subscribers","subscription_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/subscription","commits_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/contents/{+path}","compare_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/merges","archive_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/downloads","issues_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/issues{/number}","pulls_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/pulls{/number}","milestones_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/milestones{/number}","notifications_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/labels{/name}","releases_url":"https://api.github.com/repos/Zoltanuga/JavaRepository/releases{/id}","created_at":"2015-04-30T16:31:28Z","updated_at":"2015-04-30T16:28:23Z","pushed_at":"2015-05-18T21:23:06Z","git_url":"git://github.com/Zoltanuga/JavaRepository.git","ssh_url":"git@github.com:Zoltanuga/JavaRepository.git","clone_url":"https://github.com/Zoltanuga/JavaRepository.git","svn_url":"https://github.com/Zoltanuga/JavaRepository","homepage":null,"size":259,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"karzhouAndrew:master","ref":"master","sha":"9bd6ba0acd97630023757fa3fef2a0a7fe016880","user":{"login":"karzhouAndrew","id":9786654,"avatar_url":"https://avatars.githubusercontent.com/u/9786654?v=3","gravatar_id":"","url":"https://api.github.com/users/karzhouAndrew","html_url":"https://github.com/karzhouAndrew","followers_url":"https://api.github.com/users/karzhouAndrew/followers","following_url":"https://api.github.com/users/karzhouAndrew/following{/other_user}","gists_url":"https://api.github.com/users/karzhouAndrew/gists{/gist_id}","starred_url":"https://api.github.com/users/karzhouAndrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karzhouAndrew/subscriptions","organizations_url":"https://api.github.com/users/karzhouAndrew/orgs","repos_url":"https://api.github.com/users/karzhouAndrew/repos","events_url":"https://api.github.com/users/karzhouAndrew/events{/privacy}","received_events_url":"https://api.github.com/users/karzhouAndrew/received_events","type":"User","site_admin":false},"repo":{"id":34864695,"name":"JavaRepository","full_name":"karzhouAndrew/JavaRepository","owner":{"login":"karzhouAndrew","id":9786654,"avatar_url":"https://avatars.githubusercontent.com/u/9786654?v=3","gravatar_id":"","url":"https://api.github.com/users/karzhouAndrew","html_url":"https://github.com/karzhouAndrew","followers_url":"https://api.github.com/users/karzhouAndrew/followers","following_url":"https://api.github.com/users/karzhouAndrew/following{/other_user}","gists_url":"https://api.github.com/users/karzhouAndrew/gists{/gist_id}","starred_url":"https://api.github.com/users/karzhouAndrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karzhouAndrew/subscriptions","organizations_url":"https://api.github.com/users/karzhouAndrew/orgs","repos_url":"https://api.github.com/users/karzhouAndrew/repos","events_url":"https://api.github.com/users/karzhouAndrew/events{/privacy}","received_events_url":"https://api.github.com/users/karzhouAndrew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karzhouAndrew/JavaRepository","description":"","fork":false,"url":"https://api.github.com/repos/karzhouAndrew/JavaRepository","forks_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/forks","keys_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/teams","hooks_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/hooks","issue_events_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/issues/events{/number}","events_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/events","assignees_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/assignees{/user}","branches_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/branches{/branch}","tags_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/tags","blobs_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/git/refs{/sha}","trees_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/statuses/{sha}","languages_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/languages","stargazers_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/stargazers","contributors_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/contributors","subscribers_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/subscribers","subscription_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/subscription","commits_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/commits{/sha}","git_commits_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/git/commits{/sha}","comments_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/comments{/number}","issue_comment_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/issues/comments{/number}","contents_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/contents/{+path}","compare_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/merges","archive_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/downloads","issues_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/issues{/number}","pulls_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls{/number}","milestones_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/milestones{/number}","notifications_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/labels{/name}","releases_url":"https://api.github.com/repos/karzhouAndrew/JavaRepository/releases{/id}","created_at":"2015-04-30T16:28:23Z","updated_at":"2015-05-07T07:51:37Z","pushed_at":"2015-05-19T17:58:25Z","git_url":"git://github.com/karzhouAndrew/JavaRepository.git","ssh_url":"git@github.com:karzhouAndrew/JavaRepository.git","clone_url":"https://github.com/karzhouAndrew/JavaRepository.git","svn_url":"https://github.com/karzhouAndrew/JavaRepository","homepage":null,"size":4800,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":107,"forks":21,"open_issues":107,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330"},"html":{"href":"https://github.com/karzhouAndrew/JavaRepository/pull/330"},"issue":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/issues/330"},"comments":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/issues/330/comments"},"review_comments":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330/comments"},"review_comment":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/pulls/330/commits"},"statuses":{"href":"https://api.github.com/repos/karzhouAndrew/JavaRepository/statuses/a7eae0b0847cb72c0815b3880c57b98ffcb5851a"}}}}