why is it mandatory to pass string arg[] as an argument in main method? why we cannot pass any other data type available in java? whats the importance of passing String arg[
The idea is that your Java application will be invoked via a command (whether explicitly entered by a user, implicitly entered (like when you click a shortcut in your OS's GUI), etc).
The String[] refers to the command line arguments specified when your application was invoked.
See Command-Line Arguments in Oracle's Java tutorials for more details.