What Exacly (args.length>0) means?

前端 未结 6 1297
既然无缘
既然无缘 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:50

    args is an array of Command Line arguments

    When an application is launched, the runtime system passes the command-line arguments to the application's main method via an array of Strings

    Where args is an array and if (args.length > 0) is the condition cheking that array is empty or not .

提交回复
热议问题