package com.demo; public class RemoveCharacter { public static void main(String[] args) { // input string String inputString = "Welcome to JavaTechTube"; // output after removing character System.out.println("Output after removing character : " + removeGivenCharacter(inputString, "e")); } private static String removeGivenCharacter(String inputString, String removeCharacter) { inputString = inputString.replace(removeCharacter, ""); return inputString; } }
Home »
» Program to remove all the occurences of a given character from a String.
Program to remove all the occurences of a given character from a String.
Quote of the day

Popular Posts
-
Prgrammer deploys the spring web MVC application to the web-server or Application Server. Deployment actions takes place on the Dis...
-
package com.demo; public class RemoveCharacter { public static void main(String[] args) { // input string String inputString = ...
-
public class StringTest { public static void main(String[] args) { String str = "a4k3b2";// output aeknbd ...
Blog Archive
- February 2024 (1)
- November 2022 (2)
- September 2020 (2)
- June 2020 (1)
- March 2020 (1)
- January 2020 (1)
- October 2019 (1)
- June 2019 (1)
- April 2019 (2)
- March 2019 (12)
Featured Post
Collection Framework Overview
Collection:- A collection (sometimes called a container) is simply an object that groups multiple elements into single unit. Collect...

Youtube Page
Facebook Page
Recent Posts
About

I am Shivaji Chandra and I'm a Computer Science Engineer.
I love to write poems, jokes and quotes.
click here →
No comments:
Post a Comment