Skip to content

Instantly share code, notes, and snippets.

@atsushi-kitazawa
Created June 26, 2020 14:32
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 atsushi-kitazawa/0f905ea3cded09e16cda0d1ae2dbdd44 to your computer and use it in GitHub Desktop.
Save atsushi-kitazawa/0f905ea3cded09e16cda0d1ae2dbdd44 to your computer and use it in GitHub Desktop.
package com.example;
public class Sample extends SampleAbstruct<String> {
public static void main(String[] args) {
System.out.println(new Sample().test(" Bob!!"));
}
@Override
public String test(String name) {
return hello + name;
}
}
package com.example;
public abstract class SampleAbstruct<E> implements SampleInterface<E> {
protected final String hello = "hello";
}
package com.example;
public interface SampleInterface<E> {
public E test(E e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment