Solved

Consider the Following Code Snippet: Public Class Demo

Question 65

Multiple Choice

Consider the following code snippet: public class Demo
{
Public static void main(String[] args)
{
Point[] p = new Point[4];
P[0] = new Colored3DPoint(4, 4, 4, Color.BLACK) ;
P[1] = new ThreeDimensionalPoint(2, 2, 2) ;
P[2] = new ColoredPoint(3, 3, Color.RED) ;
P[3] = new Point(4, 4) ;
For (int i = 0; i < p.length; i++)
{
String s = p[i].toString() ;
System.out.println("p[" + i + "] : " + s) ;
}
Return;
}
}
This code is an example of ____.


A) overloading
B) callback
C) early binding
D) polymorphism

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions