* program to impliment interface
* @author vikas
* @version 1.00 2012/9/28
*/
interface shape{
public String bclass="shape";
public void draw();
}
class circle implements shape{
public void draw(){
System.out.println("Drwaing circle");
}
}
public class iface {
public static void main(String[] args) {
shape cshape=new circle();
cshape.draw();
}
}
* @author vikas
* @version 1.00 2012/9/28
*/
interface shape{
public String bclass="shape";
public void draw();
}
class circle implements shape{
public void draw(){
System.out.println("Drwaing circle");
}
}
public class iface {
public static void main(String[] args) {
shape cshape=new circle();
cshape.draw();
}
}
No comments:
Post a Comment