Suppose A is an interface, B is a concrete class with a no-arg constructor that implements A. Which of the following is correct?
a. A a = new A();
b. A a = new B();
c. B b = new A();
d. B b = new B();
b. A a = new B();
d. B b = new B();
Since B is a concrete class with a no-arg constructor, d is correct. Since an instance of B is also an instance of A, b is also correct.
You might also like to view...
Dynamic text fields can display the results of a calculation.
Answer the following statement true (T) or false (F)
A table of figures is a list of captions assigned to document elements, such as tables or images
Indicate whether the statement is true or false
Match each item with a statement below:
A. A template, or blueprint, that serves as the basis for new objects B. Creates aDateobject containing the current date C. Elements required for a source program to communicate with an object D. Converts a number to a string using the number of decimal places specified E. Returns the square root of the specified value F. Programming code and data that can be treated as an individual unit or component G. The easiest way to declare a custom object H. Type of array that enables you to add object properties incorporating numbers I. Returns a value rounded to the nearest integer J. ?A function assigned a name within a custom object
In which technique, we can refresh the dynamic content in android?
A - Java B - Ajax C - Android D - None of the Above