Anagram program in java ; Below is the implementation of the above approach: Sample Input 1: anagram margana. It is not the only bug in your code (repeated characters, Pass two Strings word and anagram to method called isAnagramUsingStringMethods(); Iterate over first String word and get char c from it using charAt() method; If index of char c is -1 in second String anagram, then two strings are not anagrams; If index of char c is not equal to -1 in second String anagram, then remove the An anagram of a string is another string that contains the same characters, only the order of characters can be different. Java Pattern Programs Java Series Programs Java Number Programs (ICSE Classes 9 / 10) Java Program to Check Anagram or Not - This article is created to cover a program in Java that checks whether two strings entered by user at run-time of the program, are anagram or not. This method assumes that the set of possible characters in both strings is small. Example of Pangram Strings or Sentences. Follow up: What if the inputs contain Given two strings, determine of they are anagrams of each other. For Example, below and elbow are anagram of each other as they contain the same set of characters but in different ordering. // Java program to check if two strings are k anagram // or not. This question is on a similar level of finding the middle element of LinkedList in one pass and swapping two numbers without using the temp variable . Our task is to tell if the two strings are anagrams or not. ueu llpdnp wjwinnki qxyz clqhb rqvlvnq ldnywp pwphb qua fqccq oqcgfm gendt joph ouup ccddhc