Question 1 method calls in a program are added to the data


Question 1: Method calls in a program are added to the data structure called the __________, handling calls in a last in, first out manner.

A. stack
B. LIFO manager
C. heap
D. overloader

Question 2: Random-number generator scaling is the process of:

A. causing each number in a range to have equal likelihood of being generated.
B. modifying the range from which a number will be generated.
C. calculating a sequence of numbers to be generated.
D. None of the above

Question 3: A method is invoked by a:

A. return statement.
B. method header.
C. method call.
D. None of the above

Question 4: To call a static method, use the __________ name followed by a period, and the method with its arguments.

A. class's
B. instance variable's
C. namespace's
D. All of the above

Question 5: When overloading methods, the compiler distinguishes the methods by their __________, a combination of the method's name, parameters, and order of those parameters.

A. designation
B. signature
C. passback
D. stack

Question 6: The parameter list in the method header and the arguments in the method call must agree in:

A. number.
B. type.
C. order.
D. All of the above

Question 7: If you want a method to have the ability to change a parameter value to the calling function, you precede the variable in the method call with a __________ keyword.

A. ref
B. out
C. enum
D. return

Question 8: Which of the following correctly calls the Math class method Sqrt with a value of 36?

A. Sqrt(36);
B. Math.Sqrt(36);
C. Math.Sqrt = 36;
D. None of the above

Question 9: Which keyword can you use to immediately give control back to a method's caller?

A. Continue
B. Break
C. Return
D. Next

Question 10: A constant value is declared using the __________ keyword.

A. ref
B. out
C. enum
D. const

Question 11: How are various parameters separated in the method header?

A. Brackets
B. Braces
C. Commas
D. Periods

Question 11: How are various parameters separated in the method header?

A. Brackets
B. Braces
C. Commas
D. Periods

Question 12: A(n) __________ method is a method that does not depend on the contents of an object, and therefore can be called independently, such as methods within the Math class.

A. overloaded
B. user-defined
C. static
D. public

Question 13: A static method can:

A. call only other static methods of the same class directly.
B. manipulate only static fields in the same class directly.
C. be called using the class name and a dot (.).
D. All of the above

Question 14: A programmer can __________ a program by creating user-defined methods, which are reusable methods available to be called from several locations in a program.

A. program
B. define
C. compartmentalize
D. modularize

Question 15: In object-oriented programming, methods __________ have the same name, but with a different set of parameters. This is called method __________.

A. can; overloading
B. cannot; overloading
C. can; enumeration
D. cannot; enumeration

Question 16: A method can accept several parameters. Each value passed to the method is separated by a:

A. comma (,).
B. plus (+).
C. colon (:).
D. spacer ( ).

Question 17: The __________ keyword allows the programmer to declare a set of constant values represented by identifiers.

A. ref
B. out
C. enum
D. return

Question 18: Which of the following describes a static variable?

A. A variable with one copy shared by all class objects
B. A variable whose value may not be changed
C. All of the above
D. None of the above

Question 19: By definition, the __________ of a declared object is the portion of the application that can refer to the declared entity by an unqualified name.

A. use
B. return
C. enum
D. scope

Question 20: When overloading methods, the __________ of the method is ignored by the compiler, which will result in an error if the method names and parameter list are the same.

A. name
B. return type
C. parameter order
D. parameter data types

Solution Preview :

Prepared by a verified Expert
Physics: Question 1 method calls in a program are added to the data
Reference No:- TGS01421376

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)