Solved

Consider the Following Code Snippet: Public Class Demo

Question 37

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents