1.

Which annotation is used to represent command line input and assigned to correct data type?(a) @Input(b) @Variable(c) @Command Line(d) @ParameterI have been asked this question during an interview for a job.My question is taken from Command Line Arguments in section Classes and Methods of Java

Answer»

The CORRECT option is (d) @Parameter

To elaborate: @Parameter, @Parameter(names = { “-LOG”, “-verbose” }, description = “Level of verbosity”), etc are VARIOUS forms of USING @Parameter



Discussion

No Comment Found

Related InterviewSolutions