Question: Please answer all questions. Thank you 1. Your program wishes to use the class java.util.Calendar . Your source says import java.util.Calendar; When instantiating an instance
Please answer all questions. Thank you
1. Your program wishes to use the class java.util.Calendar. Your source says import java.util.Calendar; When instantiating an instance of the class Calendar, your code can say:
A. util.Calendar c;
B. java.util.Calendar;
C. No answer text provided.
D. Calendar c;
*************************************************
2. Which statements are true about wrapper classes?
(Select all that apply!)
A. In Java every primitive data type has a corresponding wrapper class.
B.A wrapper class encapsulates a primitive data type.
C. Wrapper classes help to treat variables of primitive data types as objects.
D. Any wrapper class can hold multiple values of the same primitive data type.
E. It is possible to "extract" the primitive data type from a wrapper class object.
*************************************************
3.Every class in Java inherits from:
WARNING: write fully qualified case-sensitive name including package and class name.
*************************************************
4. Which of the following statements about access modifiers is true?
(Select all that apply!)
A. A public class can be accessed by a class from a different package
B. A method with no visibility modifier can be accessed by a class in a different package.
C. A method with no visibility modifier can be accessed by any subclass in a different package
D. A private method cannot be accessed by a class in a different package.
E. A protected method can be accessed by a subclass in a different package.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
