Implementing a stack with Java
I wanted to know if the pop() implementation can cause a memory leak?


It will not cause a memory leak, because java is a garbage collected language. When top is no longer accessible the garbale collecter will free top if it sees fit.

feedback:


In push() the null check is unnessecary, because node.next is already null by default.

public void push(E data) {
    Node node = new Node(data);
    node.next = top;
    top = node;
}

Rather then have a print() method, create a toString() method. toString() is a method of Object that is used across java to get a string representation of an object. This will make it easier to print your object to different streams.
In Node, create a getData() (and optionally setData()) method to control access to the data class, or make data final.
make top private to control use of your class to the supported methods.