ITEC 1030 Week 3 QUIZ
• Question 1
1 out of 1 points
In Java, methods must include all of the following except .
Selected
Answer:
a call to
another method
Correct
Answer:
a call to
another method
• Question 2
1 out of 1 points
All method declarations contain .
Selected
Answer:
parenthe
ses
Correct
Answer:
parenthe
ses
• Question 3
1 out of 1 points
A public static method named computeSum() is located in classA. To call
the method from within classB, use the statement .
Selected
Answer: classA.computeSum();
Correct
Answer: classA.computeSum();
• Question 4
1 out of 1 points
Which of the following method declarations is correct for a static method
named displayFacts() if the method receives an int argument?
Selected
Answer: public static void displayFacts (int data)
Correct
Answer: public static void displayFacts (int data)
• Question 5
1 out of 1 points
The method with the declaration public static int aMethod (double d)
has a method type of .
Selected
Answer: int
, Correct
Answer: int
• Question 6
1 out of 1 points
Which of the following is a correct call to a method declared as public
static void aMethod(char code)?
Selected
Answer: aMethod(‘Q’);
Correct
Answer: aMethod(‘Q’);
• Question 7
1 out of 1 points
A method is declared as public static void showResults (double d, int
i). Which of the following is a correct method call?
Selected
Answer: showResults(12.2, 67);
Correct
Answer: showResults(12.2, 67);
• Question 8
1 out of 1 points
The method with the declaration public static char procedure
(double d) has a method type of .
Selected
Answer: char
Correct
Answer: char
• Question 9
1 out of 1 points
The method public static boolean testValue (int response) returns .
Selected
Answer:
a boolean
val ue
Correct
Answer:
a boolean
val ue
• Question 10
1 out of 1 points
Which of the following could be the last legally coded line of a method
declared as public static int getVal (double sum)?
Selected
Answer:
• Question 1
1 out of 1 points
In Java, methods must include all of the following except .
Selected
Answer:
a call to
another method
Correct
Answer:
a call to
another method
• Question 2
1 out of 1 points
All method declarations contain .
Selected
Answer:
parenthe
ses
Correct
Answer:
parenthe
ses
• Question 3
1 out of 1 points
A public static method named computeSum() is located in classA. To call
the method from within classB, use the statement .
Selected
Answer: classA.computeSum();
Correct
Answer: classA.computeSum();
• Question 4
1 out of 1 points
Which of the following method declarations is correct for a static method
named displayFacts() if the method receives an int argument?
Selected
Answer: public static void displayFacts (int data)
Correct
Answer: public static void displayFacts (int data)
• Question 5
1 out of 1 points
The method with the declaration public static int aMethod (double d)
has a method type of .
Selected
Answer: int
, Correct
Answer: int
• Question 6
1 out of 1 points
Which of the following is a correct call to a method declared as public
static void aMethod(char code)?
Selected
Answer: aMethod(‘Q’);
Correct
Answer: aMethod(‘Q’);
• Question 7
1 out of 1 points
A method is declared as public static void showResults (double d, int
i). Which of the following is a correct method call?
Selected
Answer: showResults(12.2, 67);
Correct
Answer: showResults(12.2, 67);
• Question 8
1 out of 1 points
The method with the declaration public static char procedure
(double d) has a method type of .
Selected
Answer: char
Correct
Answer: char
• Question 9
1 out of 1 points
The method public static boolean testValue (int response) returns .
Selected
Answer:
a boolean
val ue
Correct
Answer:
a boolean
val ue
• Question 10
1 out of 1 points
Which of the following could be the last legally coded line of a method
declared as public static int getVal (double sum)?
Selected
Answer: