正在加载图片...
●●●●● ●●●● 局部可见性 ●●● ●●● ●●●● ●当B声明为A中方法的局部对象时,则存在A到B 的局部可见性 enterltem(id, qty) /local visibility via assignment of returning object ProductDescription desc= catalog. getProductDes(id) enterltem egister ProductCatalog ( itemID, quantity) desc= getProductDesc( itemID)局部可见性 : Register enterItem (itemID, quantity) : ProductCatalog desc = getProductDesc( itemID ) enterItem(id, qty) { ... // local visibility via assignment of returning object ProductDescription desc = catalog.getProductDes(id); ... } ⚫ 当B声明为A中方法的局部对象时,则存在A到B 的局部可见性
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有