Skip to content

Instantly share code, notes, and snippets.

@emirozturk
Created May 19, 2020
Embed
What would you like to do?
NYP soyut sınıflar
package net.emirozturk;
interface Arayuz{
void metot1();
void metot2();
}
abstract class Sinif implements Arayuz{
}
class altSinif extends Sinif{
public void metot1(){
}
public void metot2(){
}
}
public class Main {
static void fonk(Arayuz a){
a.metot2();
}
public static void main(String[] args) {
altSinif a = new altSinif();
fonk(a);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment