{"action":"created","comment":{"url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/comments/36720267","id":36720267,"diff_hunk":"@@ -0,0 +1,104 @@\n+package com.lftechnology.java.training.dipak.multiples;\r\n+\r\n+import java.util.Scanner;\r\n+\r\n+import java.util.logging.Logger;\r\n+\r\n+/*\t\r\n+ * If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.\r\n+\r\n+ *Find the sum of all the multiples of 3 or 5 below 1000.\r\n+*/\r\n+\r\n+public class Multiples {\r\n+\tprivate final static Logger LOGGER = Logger.getLogger(Multiples.class.getName());\r\n+\tint multiple[];\t\r\n+\tint index=0;\r\n+\tint range;\t\t\r\n+\tMultiples(int a){\r\n+\t\trange=a;\r\n+\t\tmultiple=new int[range];\t\r\n+\t}\r\n+\t\r\n+\t/**\r\n+\t * <p>This method check all the multiples of the user defined numbers that are taken as input within the user\r\n+\t * defined range </p>\r\n+\t * @param  array a[]\r\n+\t * @return \r\n+\t * @author <dipakthapa@lftechnology.com>\r\n+\t */\r\n+\t\r\n+\tvoid getMultiples(int a[]){\r\n+\t\tfor(int i=0;i<a.length;i++){\r\n+\t\t\tfor(int j=0;j<range;j++){\t\t//Change according to the range\r\n+\t\t\t\tif((j % a[i]) == 0 ){\r\n+\t\t\t\t\t boolean exists=ifexists(j);\r\n+\t\t\t\t\tif(!exists){\r\n+\t\t\t\t\t\tmultiple[index++]=j;\r\n+\t\t\t\t\t}\r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t}\t\t\r\n+\t}\r\n+\t/**\r\n+\t * <p>This method checks whether the given number is a multiple of the user defined numbers or not. It returns a boolean value </p>\r\n+\t * @param  a\r\n+\t * @return temp\r\n+\t * @author <dipakthapa@lftechnology.com>\r\n+\t */\r\n+\tboolean ifexists(int a){\r\n+\t\tboolean temp=false;\r\n+\t\tfor(int k=0;k<index;k++){\r\n+\t\t\tif(a == multiple[k]){\r\n+\t\t\t\ttemp=true;\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t}\r\n+\t\treturn temp;\r\n+\t}\r\n+\t/**\r\n+\t * <p>This method calculates the sum of all multiples</p>\r\n+\t * @param  \r\n+\t * @return sum\r\n+\t * @author <dipakthapa@lftechnology.com>\r\n+\t */\r\n+\tint sum(){\r","path":"src/com/lftechnology/java/training/dipak/multiples/Multiples.java","position":65,"original_position":65,"commit_id":"8e089c5ff8cb3cfc9abc9a55b9e5dc88e97a0db8","original_commit_id":"8e089c5ff8cb3cfc9abc9a55b9e5dc88e97a0db8","user":{"login":"sanjayapandey","id":2051281,"avatar_url":"https://avatars.githubusercontent.com/u/2051281?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjayapandey","html_url":"https://github.com/sanjayapandey","followers_url":"https://api.github.com/users/sanjayapandey/followers","following_url":"https://api.github.com/users/sanjayapandey/following{/other_user}","gists_url":"https://api.github.com/users/sanjayapandey/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjayapandey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjayapandey/subscriptions","organizations_url":"https://api.github.com/users/sanjayapandey/orgs","repos_url":"https://api.github.com/users/sanjayapandey/repos","events_url":"https://api.github.com/users/sanjayapandey/events{/privacy}","received_events_url":"https://api.github.com/users/sanjayapandey/received_events","type":"User","site_admin":false},"body":"Also include access modifier on method level.\r\nMore about java access modifiers: http://www.tutorialspoint.com/java/java_access_modifiers.htm","created_at":"2015-08-11T08:05:02Z","updated_at":"2015-08-11T08:05:02Z","html_url":"https://github.com/bhuwang/java_training_aug_2015/pull/12#discussion_r36720267","pull_request_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/comments/36720267"},"html":{"href":"https://github.com/bhuwang/java_training_aug_2015/pull/12#discussion_r36720267"},"pull_request":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12","id":42099490,"html_url":"https://github.com/bhuwang/java_training_aug_2015/pull/12","diff_url":"https://github.com/bhuwang/java_training_aug_2015/pull/12.diff","patch_url":"https://github.com/bhuwang/java_training_aug_2015/pull/12.patch","issue_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/12","number":12,"state":"open","locked":false,"title":"5 dipak","user":{"login":"dipakthapaofficial","id":13015291,"avatar_url":"https://avatars.githubusercontent.com/u/13015291?v=3","gravatar_id":"","url":"https://api.github.com/users/dipakthapaofficial","html_url":"https://github.com/dipakthapaofficial","followers_url":"https://api.github.com/users/dipakthapaofficial/followers","following_url":"https://api.github.com/users/dipakthapaofficial/following{/other_user}","gists_url":"https://api.github.com/users/dipakthapaofficial/gists{/gist_id}","starred_url":"https://api.github.com/users/dipakthapaofficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dipakthapaofficial/subscriptions","organizations_url":"https://api.github.com/users/dipakthapaofficial/orgs","repos_url":"https://api.github.com/users/dipakthapaofficial/repos","events_url":"https://api.github.com/users/dipakthapaofficial/events{/privacy}","received_events_url":"https://api.github.com/users/dipakthapaofficial/received_events","type":"User","site_admin":false},"body":"If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.\r\nFind the sum of all the multiples of 3 or 5 below 1000.","created_at":"2015-08-11T07:21:14Z","updated_at":"2015-08-11T08:05:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ffe23992d73b44e8220137ac5b314266d3b4e8d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12/commits","review_comments_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12/comments","review_comment_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/12/comments","statuses_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/statuses/8e089c5ff8cb3cfc9abc9a55b9e5dc88e97a0db8","head":{"label":"bhuwang:5_dipak","ref":"5_dipak","sha":"8e089c5ff8cb3cfc9abc9a55b9e5dc88e97a0db8","user":{"login":"bhuwang","id":3335673,"avatar_url":"https://avatars.githubusercontent.com/u/3335673?v=3","gravatar_id":"","url":"https://api.github.com/users/bhuwang","html_url":"https://github.com/bhuwang","followers_url":"https://api.github.com/users/bhuwang/followers","following_url":"https://api.github.com/users/bhuwang/following{/other_user}","gists_url":"https://api.github.com/users/bhuwang/gists{/gist_id}","starred_url":"https://api.github.com/users/bhuwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhuwang/subscriptions","organizations_url":"https://api.github.com/users/bhuwang/orgs","repos_url":"https://api.github.com/users/bhuwang/repos","events_url":"https://api.github.com/users/bhuwang/events{/privacy}","received_events_url":"https://api.github.com/users/bhuwang/received_events","type":"User","site_admin":false},"repo":{"id":40284843,"name":"java_training_aug_2015","full_name":"bhuwang/java_training_aug_2015","owner":{"login":"bhuwang","id":3335673,"avatar_url":"https://avatars.githubusercontent.com/u/3335673?v=3","gravatar_id":"","url":"https://api.github.com/users/bhuwang","html_url":"https://github.com/bhuwang","followers_url":"https://api.github.com/users/bhuwang/followers","following_url":"https://api.github.com/users/bhuwang/following{/other_user}","gists_url":"https://api.github.com/users/bhuwang/gists{/gist_id}","starred_url":"https://api.github.com/users/bhuwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhuwang/subscriptions","organizations_url":"https://api.github.com/users/bhuwang/orgs","repos_url":"https://api.github.com/users/bhuwang/repos","events_url":"https://api.github.com/users/bhuwang/events{/privacy}","received_events_url":"https://api.github.com/users/bhuwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bhuwang/java_training_aug_2015","description":"","fork":false,"url":"https://api.github.com/repos/bhuwang/java_training_aug_2015","forks_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/forks","keys_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/teams","hooks_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/hooks","issue_events_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/events{/number}","events_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/events","assignees_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/assignees{/user}","branches_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/branches{/branch}","tags_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/tags","blobs_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/statuses/{sha}","languages_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/languages","stargazers_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/stargazers","contributors_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/contributors","subscribers_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/subscribers","subscription_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/subscription","commits_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/contents/{+path}","compare_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/merges","archive_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/downloads","issues_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues{/number}","pulls_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls{/number}","milestones_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/milestones{/number}","notifications_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/labels{/name}","releases_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/releases{/id}","created_at":"2015-08-06T04:45:13Z","updated_at":"2015-08-06T05:00:17Z","pushed_at":"2015-08-11T08:01:42Z","git_url":"git://github.com/bhuwang/java_training_aug_2015.git","ssh_url":"git@github.com:bhuwang/java_training_aug_2015.git","clone_url":"https://github.com/bhuwang/java_training_aug_2015.git","svn_url":"https://github.com/bhuwang/java_training_aug_2015","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":0,"default_branch":"dev"}},"base":{"label":"bhuwang:dev","ref":"dev","sha":"6d9bb7f0fc95ca54112700e4903447bcf5b6055f","user":{"login":"bhuwang","id":3335673,"avatar_url":"https://avatars.githubusercontent.com/u/3335673?v=3","gravatar_id":"","url":"https://api.github.com/users/bhuwang","html_url":"https://github.com/bhuwang","followers_url":"https://api.github.com/users/bhuwang/followers","following_url":"https://api.github.com/users/bhuwang/following{/other_user}","gists_url":"https://api.github.com/users/bhuwang/gists{/gist_id}","starred_url":"https://api.github.com/users/bhuwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhuwang/subscriptions","organizations_url":"https://api.github.com/users/bhuwang/orgs","repos_url":"https://api.github.com/users/bhuwang/repos","events_url":"https://api.github.com/users/bhuwang/events{/privacy}","received_events_url":"https://api.github.com/users/bhuwang/received_events","type":"User","site_admin":false},"repo":{"id":40284843,"name":"java_training_aug_2015","full_name":"bhuwang/java_training_aug_2015","owner":{"login":"bhuwang","id":3335673,"avatar_url":"https://avatars.githubusercontent.com/u/3335673?v=3","gravatar_id":"","url":"https://api.github.com/users/bhuwang","html_url":"https://github.com/bhuwang","followers_url":"https://api.github.com/users/bhuwang/followers","following_url":"https://api.github.com/users/bhuwang/following{/other_user}","gists_url":"https://api.github.com/users/bhuwang/gists{/gist_id}","starred_url":"https://api.github.com/users/bhuwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhuwang/subscriptions","organizations_url":"https://api.github.com/users/bhuwang/orgs","repos_url":"https://api.github.com/users/bhuwang/repos","events_url":"https://api.github.com/users/bhuwang/events{/privacy}","received_events_url":"https://api.github.com/users/bhuwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bhuwang/java_training_aug_2015","description":"","fork":false,"url":"https://api.github.com/repos/bhuwang/java_training_aug_2015","forks_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/forks","keys_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/teams","hooks_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/hooks","issue_events_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/events{/number}","events_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/events","assignees_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/assignees{/user}","branches_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/branches{/branch}","tags_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/tags","blobs_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/statuses/{sha}","languages_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/languages","stargazers_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/stargazers","contributors_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/contributors","subscribers_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/subscribers","subscription_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/subscription","commits_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/contents/{+path}","compare_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/merges","archive_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/downloads","issues_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues{/number}","pulls_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls{/number}","milestones_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/milestones{/number}","notifications_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/labels{/name}","releases_url":"https://api.github.com/repos/bhuwang/java_training_aug_2015/releases{/id}","created_at":"2015-08-06T04:45:13Z","updated_at":"2015-08-06T05:00:17Z","pushed_at":"2015-08-11T08:01:42Z","git_url":"git://github.com/bhuwang/java_training_aug_2015.git","ssh_url":"git@github.com:bhuwang/java_training_aug_2015.git","clone_url":"https://github.com/bhuwang/java_training_aug_2015.git","svn_url":"https://github.com/bhuwang/java_training_aug_2015","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12"},"html":{"href":"https://github.com/bhuwang/java_training_aug_2015/pull/12"},"issue":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/12"},"comments":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/bhuwang/java_training_aug_2015/statuses/8e089c5ff8cb3cfc9abc9a55b9e5dc88e97a0db8"}}}}