Answers for "java how do you remove all occurrences of a character from a string in java?"

0

java remove character from string after

String result = input.split("-")[0];
Posted by: Guest on August-04-2020
-1

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);
   }
}
Posted by: Guest on October-13-2021

Code answers related to "java how do you remove all occurrences of a character from a string in java?"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language