Question: 1 . Advantages to creating methods in addition to the main ( ) method include all of the following except _ _ _ _ _
Advantages to creating methods in addition to the main method include all of the following except
A the main method is easier to follow
B all methods are prewritten, saving the programmer work
C it is easier to determine the overall intent of statements encapsulated in the methods
D methods are reusable
All method declarations contain
A arguments
B one or more explicitly named access specifiers
C parentheses
D the keyword static
Which of the following method declarations is correct for a static method named displayFacts if the method receives an int argument?
A public static int displayFacts
B public void displayFactsint data
C public static void displayFactsint data
D public void displayFactsstatic int
The method with the declaration public static int aMethoddouble d is a method type of
A static
B int
C double
D You cannot determine the method type.
A method is declared as public static void showResultsdouble d int i Which of the following is a correct method call?
A showResultsdouble d int i;
B showResults;
C showResults;
D Two of these are correct.
The method public static boolean testValueint response returns
A no value
B an int value
C a boolean value
D You cannot determine what is returned.
In the method header public static booleanint age age is an
A argument
B parameter
C return value
D final value
When a block exists within another block, the blocks are
A structured
B illegal
C sheltered
D nested
You can declare variables with the same name multiple times
A within a statement
B within a block
C within a method
D You never can declare multiple variables with the same name.
If a method is written to receive a double parameter, and you pass an int to the method, then the method will
A work correctly; the int will be promoted to a double
B work correctly; the parameter type will automatically become an int
C execute but issue a warning
D not work; an error message will be issued
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
