Delete duplicate strings in string array

后端 未结 13 2020
执念已碎
执念已碎 2020-12-30 00:33

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.

13条回答
  •  礼貌的吻别
    2020-12-30 01:09

    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.

提交回复
热议问题