Program to remove all occurrences of a given character from input String?

Source Code:

public class RemoveChar {
public static void main(String[] args) {
String s = “banana”;
String result = s.replace(“a”, “”);
System.out.println(result);
}
}

Output: