Apologies for copy and pasting, codegym wouldn't let me attach solution public class Solution { public static void main(String[] args) throws Exception { SimpleObject<String> stringObject = new StringObject<String>(); } static class StringObject<String> implements SimpleObject{ @Override public SimpleObject<String> getInstance() { return null; } } interface SimpleObject<T> { SimpleObject<T> getInstance(); } }