Skip to content

Instantly share code, notes, and snippets.

@rafirh
Created December 1, 2023 03:39
Show Gist options
  • Save rafirh/c63f50ad879f1c749d4908ef1a9f6ccf to your computer and use it in GitHub Desktop.
Save rafirh/c63f50ad879f1c749d4908ef1a9f6ccf to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String kalimat = scanner.nextLine();
String hasil = removeVowels(kalimat);
System.out.println(hasil);
}
private static String removeVowels(String kalimat) {
return kalimat.replaceAll("[aiueoAIUEO]", "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment