LoginSignup
0
1

More than 5 years have passed since last update.

implements

Last updated at Posted at 2017-10-16

自分用めも

Interface_sample.java
interface Animal {
    public void eat();
    public void run();
}

public class Interface_sample implements Animal {

    public void eat() {
        System.out.println("taberu");
    }
    public void run() {
        System.out.println("hashiru");
    }

    public static void main(String[] args) {
        Interface_sample ifsample = new Interface_sample();
        ifsample.eat();
        ifsample.run();
    }
}
0
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1