package com.swain;
public class StringUtil {
public static void main(String args[]) {
String before = " Himanshu Sekhar Swain ";
System.out.println("before: " + before);
String after = before.trim().replaceAll(" +", " ");
System.out.println("after: " + after);
}
}
public class StringUtil {
public static void main(String args[]) {
String before = " Himanshu Sekhar Swain ";
System.out.println("before: " + before);
String after = before.trim().replaceAll(" +", " ");
System.out.println("after: " + after);
}
}
No comments:
Post a Comment