Answers for "Interface in Java Implementation"

0

Interface in Java Implementation

interface Moveable 
{
 int AVG_SPEED = 40;
 void move();
}

class Vehicle implements Moveable 
{
 public void move()
 {
  System.out.println ("Average speed is"+AVG-SPEED");
 }
 public static void main (String[] arg)
 {
  Vehicle vc = new Vehicle();
  vc.move();
 }
}
Posted by: Guest on July-30-2021

Code answers related to "Interface in Java Implementation"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language