Remove Strings Having Numbers from List - Java Quiz Question


Write a program to remove the strings having numbers from the input list.

Input (List) Output (List)
[Siva, Arya2, Pokiri, Nayak, 3Idiots] [Siva, Pokiri, Nayak]
[78-21, 6th Street, Vani Nagar, Rajamundry, 500211] [Vani Nagar, Rajamundry]
[A1, A2, B#, B4, B@, C6, C$, D7, D*, 9E] [B#, B@, C$, D*]


import java.util.ArrayList;
import java.util.List;

class RemoveStringsHavingNumbers
{
    public static void main(String s[])
    {
        List<String> list = new ArrayList<String>();
        list.add("Siva");
        list.add("Arya2");
        list.add("Pokiri");
        list.add("Nayak");
        list.add("3Idiots");
        removeNumberStrings(list);
        System.out.println("The list after removing numbered strings is " + list);

    }


    public static void removeNumberStrings(List<String> list) {
    }

}