package array;


public class RemovingDuplicates {



    private String [] removd (String [] words){


        String [] result = new String[words.length ]; // результирующий массив

        for (int i=0; i<words.length-1;i++){        //просматриваем массив с начала


           for(int j=i+1;j<words.length-1;j++){

               if(words [i].equals(words [j])  ) {  //eсли елементы равны

                   result[i] = words[i];           // записуе элемент в результирующий массив



                }


           }

       }

        return result;
    }




    public static void main (String [] args){

        RemovingDuplicates remov = new RemovingDuplicates();

        String [] words = new String[]{"Привет", "Привет", "Мир", "Мир", "Меня", "Меня","Зовут", "Александр", "Мир"};

        String [] removd = remov.removd(words);


        for (int i=0; i<=removd.length-1;i++){
            System.out.print(removd [i] + " ");
        }

    }

}

@@ -96,17 +96,16 @@
 ords)%7B%0A%0A
-%0A
         
@@ -153,39 +153,46 @@
 h %5D; // 
-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B8%D1%80%D1%83%D1%8E%D1%89%D0%B8%D0%B9 %D0%BC%D0%B0%D1%81%D1%81%D0%B8%D0%B2%0A%0A
+array with out duplicats%0A%0A    
         
@@ -227,24 +227,28 @@
 -1;i++)%7B
+%0A   
         
 //%D0%BF%D1%80%D0%BE%D1%81%D0%BC%D0%B0
@@ -243,42 +243,42 @@
     
-//%D0%BF%D1%80%D0%BE%D1%81%D0%BC%D0%B0%D1%82%D1%80%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC %D0%BC%D0%B0%D1%81%D1%81%D0%B8%D0%B2 %D1%81 %D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%B0%0A%0A%0A
+      result%5Bi%5D= words %5Bi%5D;%0A      
     
@@ -321,17 +321,22 @@
 1;j++)%7B%0A
-%0A
+      
         
@@ -381,33 +381,321 @@
  ) %7B
-  //e%D1%81%D0%BB%D0%B8 %D0%B5%D0%BB%D0%B5%D0%BC%D0%B5%D0%BD%D1%82%D1%8B %D1%80%D0%B0%D0%B2%D0%BD%D1%8B%0A%0A
+%0A                         result%5Bi%5D = null;%0A                     %7D%0A                 %7D%0A            %7D%0A        String %5B%5D sort = new String %5Bresult.length%5D;             //sort array%0A                int count=0;%0A            for(int i = 0; i%3Cresult.length-1;i++)%7B%0A                for(int j=i+1;j%3Cresult.length-1;j++)%7B%0A 
     
@@ -701,32 +701,35 @@
                 
+if(
 result%5Bi%5D = word
@@ -725,20 +725,81 @@
 t%5Bi%5D
- = words%5Bi
+== null && result%5Bj%5D!=null )%7B%0A                        sort%5Bi%5D=result%5Bj
 %5D;
+%0A
     
@@ -809,119 +809,594 @@
     
-// %D0%B7%D0%B0%D0%BF%D0%B8%D1%81%D1%83%D0%B5 %D1%8D%D0%BB%D0%B5%D0%BC%D0%B5%D0%BD%D1%82 %D0%B2 %D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B8%D1%80%D1%83%D1%8E%D1%89%D0%B8%D0%B9 %D0%BC%D0%B0%D1%81%D1%81%D0%B8%D0%B2%0A%0A%0A%0A                %7D%0A%0A%0A           %7D%0A%0A       %7D%0A%0A        return result
+             result%5Bj%5D=null;%0A%0A                        break;%0A                    %7D%0A%0A                %7D%0A            %7D%0A%0A            for (int i =0;i%3C=sort.length-1;i++)%7B                // counter%0A                if(sort %5Bi%5D!=null) %7B%0A%0A                    count++;%0A                %7D%0A            %7D%0A%0A            String %5B%5D small = new String%5Bcount%5D;                 // array with out null%0A%0A                for(int i=0; i%3C=sort.length-1; i++)%7B%0A%0A                        if(sort%5Bi%5D!=null)%7B%0A                            small%5Bi%5D = sort%5Bi%5D;%0A%0A                   %7D%0A                %7D%0A        return small
 ;%0A  

Removing duplicates