Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1(20 points) Multiple Choice Questions (MC0s): 1. The number of argumen

ID: 3910192 • Letter: Q

Question

Question 1(20 points) Multiple Choice Questions (MC0s): 1. The number of arguments in the method call must match t in the method declaration's parameter list the number of parameters A.The , B. False 2. By convention, method names begin with an uppercase first letter and all subsequent words in the name begin with a capital first letter. A. True B. False- 3. A selection statement specifies that an action is to be repeated while some condition remains true. A. True B. False- 4. The default case is required in the switch selection statement. A. True B. False 5. The keyword void indicates that a method does not return a value. A. True B. False 6. In Java, it is possible to have several methods with the same name that caclh operate on different types or numbers of arguments A. True - B. False 7. When method print requires multiple arguments, the arguments are separated with: A. Colons (). . B. Semicolons G). C. Commas ). D. Periods (). s. All import declarations must be placed: A. Inside the class declaration's body. B. Before the class declaration C. After the class declaration. D. All of the above will work. Which of the following is not a Java primitive type? A. Char B. Byte C. Real .D. Double

Explanation / Answer

1)Answer a: True
Example:

add(5,10);

public void add(int a, int b) { }

2)Answer B: False

Example: convention is: isPalindrome(string)

3)Answer B: False

4)Answer B: False

Explantion: for switch case, default is optional.

5)Answer A: True

6)Answer A: True

Explanation: it is called method overloading in java.

public void add(int a, int b) {}

publlic void add(double a, double b,double c) {}

7)Answer C: commas

8)Answer B: Before the class declaration

Example:

import java.util.*;

class Test { }

9)Answer C: Real

Explanation: char, byte, double are primitive date types where as real is not present in java

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote