源码是什么意思?
public class Stack{
Entry top;
public void Push(object data) {
top = new Entry(top, data);
}
public object Pop() {
if (top == null) throw new InvalidOperationException();
object result = top.data;
top = top.next;
return result;
}
class Entry
{
public Entry next;
public object data;
public Entry(Entry next, object data) {
this.next = next;
this.data = data;
}
}
}
为什么一个类可以嵌套另一个类,这些代码什么意思?我看不懂,有谁给我说说,谢谢了。