JAVA If class Triangle implements the Geometry interface and
JAVA: If class Triangle implements the Geometry interface, and class RightTriangle extends Triangle, which of the following would not compile?
(a) Geometry g = new Geometry()
(b) Geometry g = new Triangle();
(c) Geometry g = new RightTriangle();
(d) Triangle t = new RightTriangle();
Solution
Answer : (a) Geometry g = new Geometry()
You can\'t instantiate an interface directly, but you can instantiate a class that implements that interface

