Created
June 26, 2020 14:32
-
-
Save atsushi-kitazawa/0f905ea3cded09e16cda0d1ae2dbdd44 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 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; | |
} | |
} |
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 com.example; | |
public abstract class SampleAbstruct<E> implements SampleInterface<E> { | |
protected final String hello = "hello"; | |
} |
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 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