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

32. Java source code that contains a class with an inner class, when compiled, w

ID: 3726604 • Letter: 3

Question

32. Java source code that contains a class with an inner class, when compiled, will not produce a separate d ID: A 33· -34. 35. A file for the inner class. The superclass inherits all its properties from the subclass. The private members of a superclass can be accessed by a subclass. 35. A subclass can override public methods of a superclass. 36. In single inheritance, the subclass is derived from a single superclass 37. A subclass inherits all its data members from the superclass; it has none of its own 38. Redefining a method of a superclass is also known as overloading a method. 39. To override a public method of a superclass in a subelass, the corresponding method in the sube have the same name but a different number of parameters. A subelass can directly access protected members of a superclass. The class object is directly or indirectly the superclass of every class in Java. 40. 41· Multiple Choice Identify the letter of the choice that best completes the statement or answers the question 42. A(n)is a collection of a fixed number of components. c. class d. member a. method b. package What is the function of the reserved word class? a. It defines a data type and allocates memory. b. It defines only a data type; it does not allocate memory. c. It acts as a modifier. d. It has no function. Which of the following is a constructor without parameters? a. copy constructor b. default constructor 43. c. finalizer d. modifier 44. 45. How many constructors can a class have? AS1 C. d. Any number a. b.

Explanation / Answer

32- False, .class files of both classes will be generated.

33- False, subclass inherits properties of super class.

34. False, Private members of super class can not be accessed in sub class.

35- True, A subclass can override public methods of Superclass.


36- True
37- False, a sub class inherits all data members of the super class, but it(sub class) also can have data members of its own.
38- False, redefining a method of super class is called as overriding.
39- False, The overriding method must have same argument list. The overriding method must have same return type (or subtype).
40- a subclass can access the protected members of the super class by using the object of subclass.
41- True. Every class in java is sub class of Object Class.


42- A(n) Method(option a)
43- It defines data tye only, does not allocate memory
44- default construcor is of without parameters.
45- A class can have any number of constructors. (option d)

IF THERE IS ANYTHING THAT YOU DO NOT UNDERSTAND, THEN PLEASE MENTION IT IN THE COMMENTS SECTION.

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