{"id":17804086,"url":"https://github.com/aakashcode12/importantjava-functions","last_synced_at":"2026-01-11T01:52:54.748Z","repository":{"id":159700981,"uuid":"296737296","full_name":"AakashCode12/importantJava-functions","owner":"AakashCode12","description":"The important java functions which can be used in future","archived":false,"fork":false,"pushed_at":"2020-10-01T19:59:32.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T19:33:37.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/AakashCode12.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}},"created_at":"2020-09-18T21:55:51.000Z","updated_at":"2020-10-01T19:59:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"442bcfbd-4f2e-4c02-8893-27be16e8b2c0","html_url":"https://github.com/AakashCode12/importantJava-functions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AakashCode12%2FimportantJava-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AakashCode12%2FimportantJava-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AakashCode12%2FimportantJava-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AakashCode12%2FimportantJava-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AakashCode12","download_url":"https://codeload.github.com/AakashCode12/importantJava-functions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246758287,"owners_count":20828919,"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":[],"created_at":"2024-10-27T12:49:01.430Z","updated_at":"2026-01-11T01:52:54.719Z","avatar_url":"https://github.com/AakashCode12.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Important Java Functions\n\n### Function to check a palindrome string\n\n    public static boolean palindromeString(String s) {\n\n      StringBuilder sb = new StringBuilder();\n      sb.append(s);\n      sb.reverse();\n      String reversedString = sb.toString();\n\n      if (reversedString.equals(s)) {\n          return true;\n      } else {\n          return false;\n      }\n\n    }\n\n### Inserting a character in a String\n\n      public static String insertCharacterInBetween(String str, char cr, int index) {\n            /*  !here the str is original String,\n                !cr is the character to be inserted and\n                !index is the index at which we need to insert the character\n            */\n            str = str.substring(0, index) + cr + str.substring(index + 1);// modified string\n            return str;\n        }\n\n### Sort a String function in java\n\n    public static String sortAlphabeticallyString(String str) {\n            char charArray[] = str.toCharArray();\n            Arrays.sort(charArray);\n            return new String(charArray);\n        }\n\n### to Sort a string or alphabet if we have its position in array\n\n##### If we have something like arr[]={0,3,1} \u0026 str[]={\"a\",\"d\",\"b\"} as input. \u0026 we want to sort the alphabetical order stored in string.\n\n##### Then we can sort it using this code. We can't use the Arrays.sort(charArray); in some cases when we also need the indexes in the array.\n\n##### here we have arr[] with all the indexes and str[] with all the strings..\n\n     int temp = 0;\n     String tempstr = \"\";\n     for (int i = 0; i \u003c n - 1; i++) {\n                for (int j = i + 1; j \u003c n; j++) {\n                    if (arr[j] \u003c arr[i]) {\n                        temp = arr[i];\n                        arr[i] = arr[j];\n                        arr[j] = temp;\n\n                    tempstr = str[i];\n                    str[i] = str[j];\n                    str[j] = tempstr;\n\n                }\n            }\n        }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faakashcode12%2Fimportantjava-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faakashcode12%2Fimportantjava-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faakashcode12%2Fimportantjava-functions/lists"}