Skip to content

Instantly share code, notes, and snippets.

@rahulkmr
Created February 7, 2010 07:36
Show Gist options
  • Save rahulkmr/297286 to your computer and use it in GitHub Desktop.
Save rahulkmr/297286 to your computer and use it in GitHub Desktop.
class Connection
{
/* generic code ; private */
/* the interface is public */
public Connection() {
}
public int connectTo() {
}
}
class OracleConnection extends Connection
{
/* implementation specific code ; private */
/* public interface */
public OracleConnection() {
}
public int connectTo() {
}
}
class Tester
{
public static void main(String[] a) {
/* coding to the interface */
Connection c = new OracleConnection();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment