Strings-Remove Duplicates

import java.io.*;
public class Main {
public static void st(String str, int i,int n){
String co=NULL;
if(i==n-1){
System.out.println(co);
}

   char c=str.charAt(i);
   co=co.substring(0)+c;
   int j=i;
   while(str.charAt[i]==str.charAt(j)){
       j++;
   }
   st(str,j,n);

}
public static void main(String args[]) {
String str=“abc”;
st(str,0,str.length());

}

}
what is wrong with my code

@Sweta,
Corrected code https://ide.codingblocks.com/s/165031
I have used an iterative approach with stringbuilder.
Your code will give error because first there is no return statement, also the logic is inccorrect