I am making a program based on string processing in Java in which I need to remove duplicate strings from a string array. In this program, the size of all strings are same.
I think the if condition at the end should be if(n==(array[m].length()-1))
Having said that, you seem to be trying to implement what String.equals() method does in your inner most loop.