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; } }
Program to remove all the occurences of a given character from a String.
Program to check vowel is present in a given String or not
package com.demo; public class ContainsVowelsOrNot { public static void main(String[] args) { //first string String str = "Java"; System.out.println("Vowels is present : "+isVowelsPresent(str)); //second string str = "bcd"; System.out.println("Vowels is present : "+isVowelsPresent(str)); } private static boolean isVowelsPresent(String str) { if(str == null) { throw new IllegalArgumentException(); } return str.toLowerCase().matches(".*[aeiou].*"); }
Quote of the day
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo_5WP_vNq_0n-yCbqKbG91qJfW-oCMlnhAUiSHgamWi_4iBjORAx21AcTskYSkvjgH7lKujiJpYZHLYnjTurY2uO0gyF6H6fKasD8MSwDiGXvmY5bSbEiycOcZFUdhVBQvS_GtV0xtg4T/s320/xB7B4292.jpg)
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...
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhizaeuRP5wVWnZKfPs7c3p7haU9rC128BTBtQlDd_vrFAO3dDCDlwwP5INC74tkLZcNIs1spH5rnRBHa89ZR7Own96Zl3dUm8iy-VdVQnba7Eq2kYsRna7lD3NKhYToQaa7LKP1Emtr8U/s400/hqdefault.jpg)
Youtube Page
Facebook Page
Recent Posts
About
![](https://instagram.fhyd5-1.fna.fbcdn.net/vp/210209515931f77780f928f9797fe11a/5C2E2255/t51.2885-15/sh0.08/e35/s750x750/40727506_1032847330250648_3276271505445469795_n.jpg)
I am Shivaji Chandra and I'm a Computer Science Engineer.
I love to write poems, jokes and quotes.
click here →