Instance without type argument

Report a typo

Consider the following generic class:

class MyClass<T> {

    private T t;

    public MyClass(T t) {
        this.t = t;
    }

    public T get() {
        return t;
    }
}

What will the get method return if you create an instance but don't specify the type argument?

MyClass instance = new MyClass("Hello!");
Select one option from the list
___

Create a free account to access the full topic