OOPs

25. Create a class, entering the command line arguments from the user and show all the arguments as output

            class Main{
                public static void main(String[] args){
                    if(args.length == 0){
                        System.out.println("Command Line Argument Not Entered");
                    }
                    else{	
                        System.out.print("Entered Arguments : ");
                        for(String arg : args){
                            System.out.print(arg + "\t");
                        }
                    }
                }
            }
        

OUTPUT

            java Main hello i am command line argument

            Entered Arguments : hello       i       am      command line    argument