What Exacly (args.length>0) means?

前端 未结 6 1295
既然无缘
既然无缘 2021-01-27 23:06

This may be simple to you people but as i am new to java, so i want know actually what is going on in the following part?

if (args.length > 0) {
    file =          


        
6条回答
  •  深忆病人
    2021-01-27 23:51

    That line is checking to see if arguments were actually entered on the command line.

    If any are entered, the first one is the name of the file.

    If none are entered, test1.xml is the default.

提交回复
热议问题