
/*
Online Java - IDE, Code Editor, Compiler

Online Java is a quick and easy tool that helps you to build, compile, test your programs online.
*/

import java.util.*;

public class Main
{
    public static void main(String[] args) {
        System.out.println("Welcome to Online IDE!! Happy Coding :)");
        
        String test = "My name is Amit1";
        ArrayList<String> al = new ArrayList<>();
        
        
        StringTokenizer st = new StringTokenizer(test);
        
        while (st.hasMoreTokens())
        {
            //st.nextToken();
            al.add(st.nextToken());
        }
        
        
        al.removeIf(n->(n.length()>4));
        
        for (String k: al)
        {
            System.out.println(k);
            
        }
        
    }
}
