Question
.Consider the following Java code: class Shape
{   void draw() {     System.out.println("Drawing a generic shape");   } } class Circle extends Shape {   @Override   void draw() {     System.out.println("Drawing a circle");   } } class Rectangle extends Shape {   @Override   void draw() {     System.out.println("Drawing a rectangle");   } } public class TestPolymorphism {   public static void main(String[] args) {     Shape s1 = new Circle();     Shape s2 = new Rectangle();     Shape s3 = new Shape();     s1.draw();     s2.draw();     s3.draw();   } } What will be the output of this code?Solution
The correct answer is A
Which of these plants contains nitrogenfixing bacteria?
Toxins present in Rape seed and Mustard oil isÂ
According to need hierarchy theory, safety needs are fulfilled after satisfying of which need?
The genetic constitution of a character present in chromosome/nucleus is known as
Green manure is a plant or its part which is incorporated in soil for enrichment Which crop is used as a green manure?
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R. Assertion A: Personal localite channels are local ...
Diversification is best described as _____.
____ month is observed as Rashtriya Poshan Maah every year in India.
Heavy infestation of which of the following causes poor ploughing performance?
Triazines and triazinones inhibit ______