0
0
Suppose A is an abstract class, B is a concrete subclass of A, and both A and B have a default constructor. Which of the following is correct?1. A a = new A();2. A a = new B();3. B b = new A();4. B b = new B();
Suppose A is an abstract class, B is a concrete subclass of A, and both A and B have a default constructor. Which of the following is correct?1. A a = new A();2. A a = new B();3. B b = new A();4. B b = new B();
A). 1 and 2
B). 3 and 4
C). 3 and 4
D). 1 and 3
E). 2 and 3
This Question has 1 answers.
2 and 4
Similar Questions
- In an alloy, zinc and copper are in the ratio 1 : 2. In the second alloy, the same elements are in the ratio 2 : 3. If these two alloys be mixed to form a new alloy in which two elements are in the ratio 5:8, the ratio of these two alloys in the new allow
- Are all the four friends viz. A, B, C and D who are sitting around a circular table, facing the centre? I) B sits second to right of D. D faces the centre. C sits to immediate right of both B and D. II) A sits to immediate left to B. C is not an immedia
- Two vessels contain mixtures of milk and water in the ratio of 8 : 1 and 1 : 5 respectively. The content of both of these are mixed in a specific ratio into a third vessel. How much mixture must be drawn from the second vessel to fill the third vessel (ca
- There is a circular path around a sports field. Sonia takes 18 minutes to drive one round of the field, while Ravi takes 12 minutes for the same. Suppose they both start at the same point and at the same time, and go in the same direction. After how many
- A train travels 40% faster than a car. Both start from point A at the same time and reach point B, 140 km away at the same time. On the way the train takes 25 minutes for stopping at the stations. What is the speed (in km/hr) of the train?