How is a colon used when starting a program on the command line?

I take a Java assessment test. I do not understand the use of colon on the command line. Can anyone comment? Thank.

That is the question ...

Given:

class One {
    int x = 0;
    {assert x == 1;}
}
public class Two {
    public static void main(String[] args) {
        int y = 0;
        assert y == 0;
        if(args.length > 0)
            new One();
    }
}

Which of the following will run without errors? (Select all that apply.)

A. java Two
B. java Two x
C. java -ea Two
D. java -ea Two x
E. java -ea: One Two
F. java -ea: One Two x
G. java -ea: Two Two x
+3
source share
2 answers

-eais a command line argument for including statements. If you give a class after -ea, it is included only for the listed classes. for example -ea:Oneincludes statements for a classOne

+3
source

You can refer to Standard Settings

0
source

All Articles