Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to remove a sting character in java

public class RemoveParticularCharacter
{
   public static void main(String[] args)
   {
      String strInput = "Hello world java";
      System.out.println(removeCharacter(strInput, 6));
   }
   public static String removeCharacter(String strRemove, int r)
   {
      return strRemove.substring(0, r) + strRemove.substring(r + 1);
   }
}
 
PREVIOUS NEXT
Tagged: #remove #sting #character #java
ADD COMMENT
Topic
Name
1+1 =