Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String argv[]) {

        String noVowels = takeOutVowel("Hello how are you?");
        System.out.println(noVowels); // prints "Hll hw r y?"
    }

    private static String takeOutVowel(String s) {
        return s.replaceAll("[aeiou]", "");
    }
}