Question: (4) (s points) Which statement best describes the relationship between superclass and subclass types? A subelass reference cannot be assigned to a superclass variable and
(4) (s points) Which statement best describes the relationship between superclass and subclass types? A subelass reference cannot be assigned to a superclass variable and a superclass reference cannot be assigned to a subclass variable A. referenc can be assigned to a subclass variable A superclass reference can be assigned to a subclass variable, but a subclass reference cannot be assigned to a superclass variable A subclass reference can be assigned to a superciass variable, but a superclass reference cannot be assigned to a subclass variable. C. D. (Cyele the answer) (5) (3 points) When a superclass variable refers to a subclass object and a method is caed on that object, the proper implementation is determined at execution time. What is the process of determining the correct method to call? A. early binding. B. non-binding. Con-time binding. D. late binding E. Compile-time Binding. F. early dynamic binding (Cycle the answer) (6) (10 points) What is the output of running the following program? public class Classc ( public static void main(Stringtl args) B b new B); B b1 new 8(5) class At public A) ( System.out.printin(" A's no-arg Constructor") public A(int x) f Systen.out.println("A Constructor with arg: " + class B extends A public 80 f System. out. println(-8% no-arg constructor"); public B(int x) f x) System.out.printin("B Constructor with arg
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
