Question: Question 1: A. Answer the following multiple choice questions: 1. Constructors are used to A. To build a user interface C. Instantiate a new object.
Question 1: A. Answer the following multiple choice questions: 1. Constructors are used to A. To build a user interface C. Instantiate a new object. B. Free memory. D. to create a sub class 2. T wo or more methods with same name in the same class with different arguments is known as A. method overriding C. method constructor B method overloading D. method binding 3. In object oriented language, the single unit which has data and its operations is termed as A. Inheritance B. Object A. Constant B. Loop 4. Encapsulation concept in java is A. Hiding complexity B. Hiding constructor C. method hiding D. None 5. Attributes declared as private in an object oriented language is safe from accidental alternation as it is Can be access through provided public methods Can two classes contain member methods with the same name and same input data type? C. Constant D. None of the available answers B. The user can't alternate it 6. CO Yes, this is method overloading No, the input variables data type must be different. Yes, always possible. A. D. Yes. Only if the two classes are in B. different packages. Suppose that str is a variable of type String that already has a value. Write an if statement that will test whether the first character in str is equal to the last character in str, and output a message indicating wither They are the SAME or They are DIFFERENT. B. Let x and y are variables of type double and have values. Write 1 line of code that prints out the value of vx +Y C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
