Question: Multiple choice a. The main() method of a program has: I. No parameters Il. One String parameter IlI. One parameter which is an array of
a. The main() method of a program has: I. No parameters Il. One String parameter IlI. One parameter which is an array of String values IV. An array of integers as the first parameter and an array of strings as the second parameter. b. Which of the following statements are true for Java methods (static methods). . A java file can contain the definition of more than one method, but each II. Two different methods in the same java file can declare local variables with III A method must contain exactly one return statement (unless its return type is IV. The scope of a local variable declared within a method is not limited to that method must have a different name. the same name. void). method, but can be accessed outside the method too c. If the computer displays an error message while executing your program, the program contains a(n) I. syntax error II. run-time error III. logic error Iv. hidden error d. The expression super.foo() in a method I. is a call to a method named super.foo in the same class II. is a call to the foo method in the base class IlI. is a call to the constructor of the class named foo IV. is a syntax error e. Which one of the following is not a valid identifier: . TAX RATE Il. week$Sales III. pair_ 2shoes Iv. flag.value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
