public class Remove {
public static void main(String[] args) {
String s = "dsf ewgwd dgg d , dfsdg";
int index = s.indexOf(',');
String [] arr = s.substring(0,index).split(" ");
for(String ss : arr){
//String a = ss.trim();
if(ss.compareTo("")!=0)
System.out.println(ss+"***"+ss.length());
}
}
}
|
|