Write a program to remove a given character from String in Java. Your program must remove all occurrences of a given character.
For example, if given String is "aaaaa"
and String to remove is "a"
then the output should be an empty String.
Similarly, if input String is "abc"
and character to remove is "b"
then your program must return "ac"
as output.
You are not allowed to use any JDK method or third party method which solves this method directly, but you can use basic String manipulation method like indexOf(), toChar() or substring() from java.lang.String class.