I was referring to this article.
Is it correct to say following ?
<code>List names = new ArrayList<>();
</code>
<code>List names = new ArrayList<>();
</code>
List names = new ArrayList<>();
a) Here List
is generic. But a raw type of generic List <E>
.
Since List
interface is generic interface, having type parameters.
<code>public interface List<E> extends SequencedCollection<E>
</code>
<code>public interface List<E> extends SequencedCollection<E>
</code>
public interface List<E> extends SequencedCollection<E>
b)
<code>public interface MyInterface
</code>
<code>public interface MyInterface
</code>
public interface MyInterface
If we had above, and use
<code>MyInterface myInterface;
</code>
<code>MyInterface myInterface;
</code>
MyInterface myInterface;
then MyInterface
is not a raw type and not a generic, because MyInterface
is not having type parameters and is not a generic?