Skip to content

Instantly share code, notes, and snippets.

@karanmalhi
Created June 14, 2011 18:58
Show Gist options
  • Save karanmalhi/1025591 to your computer and use it in GitHub Desktop.
Save karanmalhi/1025591 to your computer and use it in GitHub Desktop.
Basic interface and its impl
package learnquest;
public interface Reversable<T> {
T reverse(T str);
}
class StringReverser implements Reversable<String> {
@Override
public String reverse(String str) {
StringBuffer buf = new StringBuffer(str);
buf.reverse();
return buf.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment