04-24-2011, 08:31 PM
When while running CmdLineArgsApp you do not provide any command line arguments you get this exception.
Because in the code args[0] and args[1] are being used , if we do not provide any argument at command line, args[0] and args[1] do not have any value and exception is generated.
You can place a check to avoid this exception, you can check for number of element (i.e. check the value of args.length ) in args array if they are greater then 0 then proceed futher.
Because in the code args[0] and args[1] are being used , if we do not provide any argument at command line, args[0] and args[1] do not have any value and exception is generated.
You can place a check to avoid this exception, you can check for number of element (i.e. check the value of args.length ) in args array if they are greater then 0 then proceed futher.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
