Answers for "java interface function"

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
0

syntax for java interfaces

  class  ClassName [ extends SuperClassName ]
		[ implements InterfaceName1 [, Interface Name2 �] )  {
			class body 
	}
Posted by: Guest on June-28-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language