A) It begins at the opening { of the class declaration and terminates at the closing }.
B) It limits label scope to only the method in which it is declared.
C) It begins at the identifier's declaration and ends at the terminating right brace (}) .
D) It is valid for one statement only.
Correct Answer
verified
Multiple Choice
A) the method name
B) that method's return
C) the method body
D) the arguments to the method
Correct Answer
verified
Multiple Choice
A) ceil
B) abs
C) parseInt
D) log
Correct Answer
verified
Multiple Choice
A) A method is called with its name and parentheses.
B) x and y are parameters.
C) Copies of x and y are passed to the method calculateValue.
D) x and y are arguments.
Correct Answer
verified
Multiple Choice
A) class
B) enum
C) enumeration
D) None of the above.
Correct Answer
verified
Multiple Choice
A) randomNumbers.nextInt(7) ;
B) randomNumbers.nextInt(2) ;
C) randomNumbers.nextInt(1) ;
D) randomNumbers.nextInt(25) ;
Correct Answer
verified
Multiple Choice
A) stack overflow.
B) stack rewind.
C) stack full.
D) stack empty.
Correct Answer
verified
Multiple Choice
A) A and B are overloaded; C and D are overloaded.
B) A and C are overloaded; B and D are overloaded.
C) A, B and C are overloaded.
D) All four methods are overloaded.
Correct Answer
verified
Multiple Choice
A) The Java API consists of packages.
B) The Java API helps programmers avoid "reinventing the wheel."
C) The Java API consists of import declarations.
D) None of the above.
Correct Answer
verified
Multiple Choice
A) method, class.
B) class, block.
C) block, statement.
D) statement, file.
Correct Answer
verified
Multiple Choice
A) Color
B) Colors
C) RGBColor
D) RGBColors
Correct Answer
verified
Multiple Choice
A) without knowing the name of the class in which main is declared.
B) by creating an object of the class in which main is declared.
C) without creating an instance of the class in which main is declared.
D) None of the above.
Correct Answer
verified
Multiple Choice
A) method name
B) return type
C) number of parameters
D) order of the parameters
Correct Answer
verified
Multiple Choice
A) 10
B) e
C) 2
D) pi
Correct Answer
verified
Multiple Choice
A) classes
B) numbers
C) strings
D) characters
Correct Answer
verified
Multiple Choice
A) Scope refers to the classes that have access to a variable.
B) Scope determines whether a variable's value can be altered.
C) Scope is the portion of a program that can refer to an entity by its simple name.
D) Scope allows the programmer to use a class without using its fully qualified name.
Correct Answer
verified
Multiple Choice
A) If a method does not return a value, the return-value-type in the method declaration can be omitted.
B) Placing a semicolon after the right parenthesis enclosing the parameter list of a method declaration is a syntax error.
C) Redeclaring a method parameter as a local variable in the method's body is a compilation error.
D) Forgetting to return a value from a method that should return a value is a compilation error.
Correct Answer
verified
Multiple Choice
A) performs multiple unrelated tasks
B) repeats code found in other methods
C) contains thousands of lines of code
D) performs a single, well-defined task
Correct Answer
verified
Multiple Choice
A) method name
B) return type
C) parameter lists
D) method signature
Correct Answer
verified
Multiple Choice
A) All of the above.
B) A, B, D, E.
C) A, B, C, D.
D) A, C, D, E.
Correct Answer
verified
Showing 1 - 20 of 36
Related Exams