import java.util.ArrayList;
import java.util.Scanner;
class Simple
{
public static void main(String args[])
{
ArrayList mylist = new ArrayList();
mylist.add("Heera");
mylist.add("ravish");
mylist.add("Aman");
System.out.println("before deletion
List is "+mylist);
Scanner
sc = new Scanner(System.in);
System.out.println("Enter name: ");
String s=sc.next();
if(mylist.contains(s)==true)
{
System.out.println("Found");
mylist.remove(s);
System.out.println(s+" Found
deleted");
}
else
{
System.out.println("Not Found");
}
System.out.println("alfter deletion
List is "+mylist);
}
}