*** In Java *** Please don\'t answer if you are not sure! 1. A constructor can r
ID: 3571875 • Letter: #
Question
*** In Java *** Please don't answer if you are not sure!
1. A constructor can return a value of type double.
True
False
-------------------------------------------------
2. Two arrays are parallel if they hold the same type of data.
True
False
-------------------------------------------------
3. Only a fixed number of elements can be stored in an ArrayList?
True
False
-------------------------------------------------
4. Every component of an ArrayList object is a reference.
True
False
-------------------------------------------------
5. A class and its members can be described graphically using Unified Modeling Language (UML) notation.
True
False
-------------------------------------------------
6. When a return statement executes in a user-defined method, the method immediately exits.
True
False
-------------------------------------------------
7. The instance variable length is a public member of an array object and can be directly accessed using the dot operator (eg. scores.length ).
double[] scores = new double[7];
True
False
-------------------------------------------------
8. In Java, void methods return a value of type String.
True
False
-------------------------------------------------
9. A method can be defined within the body of another method. This is known as nesting methods.
True
False
-------------------------------------------------
10. The private variables of a class are accessible in any method of that class.
True
False
-------------------------------------------------
11. If a Java method does not use parameters, parentheses around the empty parameter list are still needed.
True
False
-------------------------------------------------
12. Parameters allow you to use different values each time the method is called.
True
False
-------------------------------------------------
13. In a Java class, the name of a constructor can be anything but the same as the name of the class.
True
False
-------------------------------------------------
Explanation / Answer
Question 1
Answer: False
Question 2
Answer: True
Question 3
Answer:False
Question 4
Answer:True
Question 5
Answer:True
Question 6
Answer:True
Question 7
Answer:True
Question 8
Answer:False
Question 9
Answer:True
Question 10
Answer:True
Question 11
Answer:True
Question 12
Answer:True
Question 13
Answer:True
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.