static/non-static innerclass : The type parameter T is hiding the type T

Viewed 416

When I use static nested class, I don't get the warning The type parameter T is hiding the type T. However, when I use the non-static nested class I get the warning.

public class CustomStack<T> {
    private class CustomNode<T>{
        private T data;
        private CustomNode<T> next;

        public CustomNode(T data){
            this.data = data;
        }   

    }
}

I want to know, why don't I get this warning when I use static nested class?

2 Answers
Related