[Java] acquisition and judgment of command line parameters

xiaoxiao2021-03-06  115

The following program block acquires command line parameters and determines its value. The first judgment guarantees if there is no parameter input, output all items, if there is a parameter, the later IF statement is output according to the judgment. Public static void main (String Argv []) {

String test = "all"; if (argv.Length> 0) {test = argv [0];

IF (Test.Equals ("all") || Test.Equals ("TOSTREAMRESULT")) {system.out.println ("/ n / n ==== ttreamReamResult ====");

Try {exampletostreamresult ();} catch (xpathexception ex) {handlexception (ex);}} ..........}

转载请注明原文地址:https://www.9cbs.com/read-99394.html

New Post(0)