并不是强类型的。如果你意外地向myList添加了除了 FrameStructure之外的东西,那么直到运行时 CType失败才会知道它。强类型列表会阻止我首先在 中执行此操作。 将运行时错误转换为编译时错误是强类型 就是这样。isn''t strongly typed. If you accidently add something other than aFrameStructure to myList, you won''t know about it until runtime when theCType fails. A strongly-typed list would prevent me from doing that inthe first place.Converting runtime errors into compile-time errors is what strong typingis all about. 这篇关于ArrayList强类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
05-30 21:42