Advertisement
weeez

példa

Jan 17th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. package tesztelek;
  2.  
  3. interface Szia{
  4.    String kiir();
  5. }
  6. public class Tesztelek {
  7.  
  8.     public static void main(String[] args){
  9.             new Kiiras(
  10.                 new Szia(){
  11.                         @Override
  12.                         public String kiir(){
  13.                                 return "Szia";
  14.                         }
  15.                 }
  16.                   );
  17.     }
  18.    
  19. }
  20. class Kiiras{
  21.     Szia s;
  22.     Kiiras(Szia s){
  23.         this.s = s;
  24.             System.out.println(s.kiir());
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement