全局作用域的本质是个集合吗?
但是这个集合的引用被谁拿走了,为什么不会别gc回收?
是web程序拿走了他的引用吗?
web程序是什么?是一个main(){}方法吗?
再java中函数是不能脱离对象而单独存在的,main()的存在明显违背了这种思想啊?
全局作用域是一个map集合,引用是被服务器拿走了,http服务器实现了13中规范。
我们写的web程序相当于是一个main{}。
main{}是静态方法,是可以脱离对象而单独存在。