正在加载图片...
Static vs.non-static oStatic:class variable/method o Non-static:instance variable/method Static ones are associated with class,not object.Can be called using class name directly ●main()is static OEven though it's in a class definition,no instance of the class exist when main starts executingStatic vs. non-static lStatic: class variable/method lNon-static: instance variable/method lStatic ones are associated with class, not object. Can be called using class name directly lmain() is static ¡Even though it’s in a class definition, no instance of the class exist when main starts executing
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有