{}
CODE VISUALIZER
Master DSA, Python and C with step-by-step code visualization.
See it in action
CODE VISUALIZER
Master DSA, Python and C with step-by-step code visualization.
See it in action
run-icon
Main.java
// Online Java Compiler // Use this editor to write, compile and run your Java code online class Main { public interface Shape { double perimeter(); double area(); } public abstract class Polygon implements Shape {} public class ConvexPolygon extends Polygon { @Override public double perimeeter() { return 0d; } @Override public double area() { return 0d; } } public static void main(String[] args) { System.out.println("perimeeter should throw an error because it has a typo and doesn't actually override or implement anything"); } }
Output