Created
December 7, 2012 09:11
-
-
Save fikovnik/4232017 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 tp8; | |
public class App { | |
public static void main(String[] args) { | |
IPlugin plugin = loadPlugin("PluginA"); | |
plugin.printMessage(); | |
} | |
private static IPlugin loadPlugin(String string) { | |
// TODO Auto-generated method stub | |
return null; | |
} | |
} | |
package tp8; | |
public interface IPlugin { | |
public void printMessage(); | |
} | |
package tp8; | |
public class PluginA implements IPlugin { | |
@Override | |
public void printMessage() { | |
System.out.println("Hi from Plugin A"); | |
} | |
} | |
package tp8; | |
public class PluginB implements IPlugin { | |
@Override | |
public void printMessage() { | |
System.out.println("Hi from Plugin B"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment