What does the following piece of code do?for (int i = 0; i < arr.length-1; i++){    for (int j = i+1; j < arr.length; j++)    {        if( (arr[i].equals(arr[j])) && (i != j) )        {            System.out.println(arr[i]);        }    }}

Comments and Answers (2)

Archana

Archana

please anyone explain this answer

Bhuvna

Bhuvna

please explain answer

Avatar

{{SampleComment.userName || "Your Name"}} ~ {{SampleComment.userCity}}

{{SampleComment.commentValue || "Your Answer or Comment goes here...."}}