Getting Exception while running next word java file in unix

Hi,

I am trying to run the next word java program provided by cloudxlab. But while passing arguments, I am getting array out of bound exception. Kindly let me know what I am doing wrong.

Hi…it is working now. To fetch the command line arguments in the NWDriver.java (driver class for next word program),the codeis written as array[1] and array[2]. But it will be array[0] and array[1]. Kindly change the code.