{"id":20713391,"url":"https://github.com/roshan-khandagale/programs-java","last_synced_at":"2025-06-29T21:02:45.100Z","repository":{"id":227129044,"uuid":"770540628","full_name":"ROSHAN-KHANDAGALE/Programs-Java","owner":"ROSHAN-KHANDAGALE","description":"This is a Java Practice Solution Repository where there are set of Problem solved and saved in it.","archived":false,"fork":false,"pushed_at":"2024-04-16T15:33:57.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T21:02:00.369Z","etag":null,"topics":["arrays","dsa-practice","java","loops-and-conditions","loops-and-iterations","practice-programming","strings","swapping-algorithm","upskill"],"latest_commit_sha":null,"homepage":"https://github.com/ROSHAN-KHANDAGALE/Programs-Java.git","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ROSHAN-KHANDAGALE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-11T18:16:47.000Z","updated_at":"2024-04-08T20:02:50.000Z","dependencies_parsed_at":"2024-03-15T17:49:49.928Z","dependency_job_id":"6cf0450c-02ad-4f81-bf17-267235c8ff36","html_url":"https://github.com/ROSHAN-KHANDAGALE/Programs-Java","commit_stats":null,"previous_names":["roshan-khandagale/programs-java"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ROSHAN-KHANDAGALE/Programs-Java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROSHAN-KHANDAGALE%2FPrograms-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROSHAN-KHANDAGALE%2FPrograms-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROSHAN-KHANDAGALE%2FPrograms-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROSHAN-KHANDAGALE%2FPrograms-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ROSHAN-KHANDAGALE","download_url":"https://codeload.github.com/ROSHAN-KHANDAGALE/Programs-Java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROSHAN-KHANDAGALE%2FPrograms-Java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262667246,"owners_count":23345524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arrays","dsa-practice","java","loops-and-conditions","loops-and-iterations","practice-programming","strings","swapping-algorithm","upskill"],"created_at":"2024-11-17T02:25:04.826Z","updated_at":"2025-06-29T21:02:45.016Z","avatar_url":"https://github.com/ROSHAN-KHANDAGALE.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **JAVA Questions**\n## Loops\n1. **Print Numbers**: Write a program to print numbers from 1 to 10 using a for loop. ✅\n2. **Even Numbers**: Print even numbers between 1 and 20 using a for loop. ✅\n3. **Odd Numbers**: Print odd numbers between 1 and 20 using a while loop. ✅\n4. **Sum of Numbers**: Calculate the sum of numbers from 1 to 100 using a for loop. ✅\n5. **Factorial**: Calculate the factorial of a number using a while loop. ✅\n6. **Fibonacci Series**: Generate Fibonacci series up to n terms using a for loop. ✅\n7. **Reverse Number**: Reverse a given number using a while loop.\n8. **Palindrome Number**: Check if a given number is a palindrome using a while loop.\n9. **Prime Numbers**: Print prime numbers up to n using nested for loops.\n10. **Armstrong Number**: Check if a number is an Armstrong number using a for loop.\n11. **Sum of Digits**: Calculate the sum of digits of a number using a while loop. ✅\n\n## Arrays\n1. **Copy Array**: Copy the elements of one array into another array. ✅\n2. **Sum of Array Elements**: Write a program to calculate the sum of all elements in an array. ✅\n3. **Average of Array Elements**: Calculate the average of elements in an array. ✅\n4. **Largest Element in Array**: Find the largest element in an array. ✅\n5. **Smallest Element in Array**: Find the smallest element in an array. ✅\n6. **Search Element in Array**: Search for a specific element in an array and print its index if found. ✅\n7. **Reverse Array**: Reverse the elements of an array. ✅\n8. **Duplicate Elements in Array**: Print the Duplicate elements of an array. ✅\n9. **Sort Duplicate Elements**: Remove Duplicate Element in an array. ✅\n10. **Sorting in Ascending Order**: Sort the elements of an array in Ascending order. ✅\n11. **Sorting in Descending Order**: Sort the elements of an array in Descending order. ✅\n12. **Total Elements in Array**: Print the number of elements in an array. ✅\n13. **Odd Even Elements**: Print Odd and Even Numbers from an array. ✅\n14. **Left Rotate Elements in Array**: Java Program to the left rotate the elements of an array. ✅\n15. **Right Rotate Elements in Array**: Java Program to right rotate the elements of an array. ✅\n16. **Shift Index Ascending**: Java Program to Sort the elements of an array in Ascending order from a specific Index. ✅\n17. **Shift Index Descending**: Java Program to Sort the elements of an array in Descending order from a specific Index. ✅\n18. **User Defined Array**: Java Program to create a user Defined Array. ✅\n19. **Total Length and Present Element**: Java Program to Insert Elements in an Array and Print its Elements and Length. ✅\n20. **Add Element at First Index**: Program to add Element at First Index of an Array. ✅\n21. **Add Element at Last Index**: Program to add Element at Last Index of an Array. ✅\n22. **Add Element at given Index**: Program to add Element at a given Index of an Array. ✅\n\n## Matrix\n1. **Addition of Array**: To Add two Dimensional array.\n2. **Subtraction of Array**: To Subtract two Dimensional array.\n3. **Multiplication of Array**: To Multiply two Dimensional array.\n4. **Division of Array**: To Divide two Dimensional array.\n\n## Strings\n1. **Count Total Character**: Program to Calculate the Total Number of Characters in a String. ✅\n2. **Count Punctuation**: Java Program to count the total number of punctuation characters exists in a String. ✅\n3. **Count Vowels and Consonants**: Java Program to count the total number of vowels and consonants in a String. ✅\n4. **Anagram of Strings**: Java Program to determine whether two strings are the anagram. ✅\n5. **Replace Spaces to Characters**: Java Program to replace the spaces of a string with a specific character. ✅\n6. **Reverse of String**: Java Program to find Reverse of the string. ✅\n\n## EXTRA PROBLEM-SOLVING  \u003cbr/\u003e\n1. **FIZZBUZZ PROBLEM** ✅ \u003cbr/\u003e\n   Given a number n, for each integer i in the range \u003cbr/\u003e \n   from i to n inclusive, print one value per line as \u003cbr/\u003e\n   follows: \u003cbr/\u003e\n   \u0026emsp;• If i is a multiple of both 3 and 5, print FizzBuzz.\u003cbr/\u003e\n   \u0026emsp;• If i is a multiple of 3(but not 5), print Fizz.\u003cbr/\u003e\n   \u0026emsp;• If i is a multiple of 5(but not 3), print Buzz.\u003cbr/\u003e\n   \u0026emsp;• If i is not a multiple of 3 or 5, print the value of i. \u003cbr/\u003e \u003cbr/\u003e\n\n   **Function Description:** \u003cbr/\u003e\n   Complete the function fizzBuzz in the editor below.\n\n   fizzBuzz has the following parameter(s): \u003cbr/\u003e\n   int n: upper limit of values to test (inclusive) \u003cbr/\u003e\n   Returns: NONE \u003cbr/\u003e\n   Prints: \u003cbr/\u003e\n   The function must print the appropriate response for each value i in the set {1, 2, ... n} in \u003cbr/\u003e\n   ascending order, each on a separate line.\u003cbr/\u003e\u003cbr/\u003e\n\n   **Constraints:** \u003cbr/\u003e\n   \u0026emsp;• 0 \u003c n \u003c 2x10\u003csup\u003e5\u003c/sup\u003e \n\n   \u003cbr/\u003e**EXPECTED OUTPUT :** \u003cbr/\u003e\n   \u003cimg src=\"https://github.com/ROSHAN-KHANDAGALE/Programs-Java/assets/92646499/7bfc8362-cd71-42a5-842c-0ab0e4382c71\" alt=\"Expected Output\" width=\"250\" height=\"350\" /\u003e\n\n   \u003cbr/\u003e**Explanation:** \u003cbr/\u003e\n   The numbers 3, 6, 9, and 12 are multiples of 3(but not 5), so print Fizz on those lines.\n   The numbers 5 and 10 are multiples of 5(but not 3), so print Buzz on those lines.\n   The number 15 is a multiple of both 3 and 5, so print FizzBuzz on that line.\n   None of the other values is a multiple of either 3 or 5, so print the value of i on those lines. \u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n2. **LECTURE Question** ✅\u003cbr/\u003e \n   \u003cp style=\"text-align: justify;\"\u003eA new Chemistry teacher is very strict and wants\u003cbr/\u003e\n   the students to do well in class. To aid this, lectures\u003cbr/\u003e\n   on each chapter will be repeated periodically\u003cbr/\u003e\n   through the semester. In each class, the next\u003cbr/\u003e\n   chapter is presented. When they reach the end of\u003cbr/\u003e\n   the book, the lectures start over with chapter 0.\u003cbr/\u003e\n   More formally, if there are numChapters in the\u003cbr/\u003e\n   book, then on the day, the lecture will be on\u003cbr/\u003e\n   chapter i%numChapters. The first day of class is\u003cbr/\u003e\n   class[0], and the first chapter is chapter 0. If there\u003cbr/\u003e\n   are 3 chapters, daily lectures are on chapters class\u003cbr/\u003e\n   = [0, 1, 2, 0, 1, 2, ...1. At class[4], the lecture will be\u003cbr/\u003e\n   on chapter 4%3 = 1.\u003cbr/\u003e\u003cbr/\u003e\n   One of the students is going to be out of class for a\u003cbr/\u003e\n   wedding, and the teacher is concerned about\u003cbr/\u003e\n   missed lectures. Given the first and last days the\u003cbr/\u003e\n   student will be out, determine the number of\u003cbr/\u003e\n   chapters for which the student will miss lectures.\u003cbr/\u003e\n   For example, there are numChapters = 4 chapters\u003cbr/\u003e\n   in the book. The student is out of class beginning\u003cbr/\u003e\n   on day b =3through ending day e = 5. The series\u003cbr/\u003e\n   of lectures are on chapters class = [0, 1, 2, 3, 0, 1, 2, 3,..] \u003cbr/\u003e\n   starting from day 0. For class[3] through \u003cbr/\u003e\n   class[5], lectures are given on chapters 3, O and 1.\u003cbr/\u003e\n   The student will miss lectures on 3 chapters.\u003cbr/\u003e\u003c/p\u003e\u003cbr/\u003e\n\n   **Function Description:**\u003cbr/\u003e\n   Complete the function \u003ci\u003emissedLectures\u003c/i\u003e in the editor below. The function must return an integer.\u003cbr/\u003e\n   * \u003ci\u003emissedLectures\u003c/i\u003e has the following parameters: \u003cbr/\u003e\n   * \u003ci\u003enumChapters: an integer \u003cbr/\u003e\u003c/i\u003e \n   * \u003ci\u003eb: an integer \u003cbr/\u003e\u003c/i\u003e\n   * \u003ci\u003ee: an integer \u003cbr/\u003e\u003c/i\u003e \u003cbr/\u003e\n   \n   **Constrains**\n   * \u003ci\u003e1 \u003c= numChapters \u003c= 10\u003csup\u003e9\u003c/sup\u003e\u003c/i\u003e \u003cbr/\u003e\n   * \u003ci\u003e1 \u003c= b \u003c= e \u003c= 10\u003csup\u003e9\u003c/sup\u003e\u003c/i\u003e \u003cbr/\u003e\u003cbr/\u003e\n\n   **Sample Input For Custom Testing**\u003cbr/\u003e\n   **5**\u003cbr/\u003e\n   **5**\u003cbr/\u003e\n   **6**\u003cbr/\u003e\u003cbr/\u003e\n   **Sample Output**\u003cbr/\u003e\n   **2**\u003cbr/\u003e\u003cbr/\u003e\n   **Explanation**\u003cbr/\u003e\n   Chapters are taught in the order class = [0, 1, 2, 3, 4, 0, 1, 2, 3, 4] The student\nwill miss chapters 0 and 1 on days 5 and 6 respectively.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froshan-khandagale%2Fprograms-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froshan-khandagale%2Fprograms-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froshan-khandagale%2Fprograms-java/lists"}