Created
September 22, 2020 16:20
-
-
Save mrnirva/f5c339873e240bc3b2364553e261b5a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package interfaces; | |
public class Arayuzler { | |
public static void main(String[] args) { | |
Kopekler kopek = new Kopekler(); | |
kopek.yemekYe(); | |
} | |
} | |
interface Hayvanlar{ | |
void yemekYe(); | |
} | |
interface Memeliler{ | |
void ure(); | |
} | |
// Görüldüğü üzere birden fazla interface | |
// implements ile alıp kullabildik | |
class Kopekler implements Hayvanlar,Memeliler{ | |
@Override | |
public void yemekYe() { | |
System.out.println("Et Ye"); | |
} | |
@Override | |
public void ure() { | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment