Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@emirozturk
Created May 19, 2020 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emirozturk/75ec6316c3e05f35f0c41b53ad267456 to your computer and use it in GitHub Desktop.
Save emirozturk/75ec6316c3e05f35f0c41b53ad267456 to your computer and use it in GitHub Desktop.
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