什么是Java中的遗留类? [英] what are the legacy classes in Java?

查看:1019
本文介绍了什么是Java中的遗留类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近听到 Vector是旧版课程,然后我在网站上阅读了


旧集合用于在集合来之前保存对象。


所以,为什么不调用 > c>

解决方案

blockquote>

旧类和接口是类和接口,
形成了早期版本中的集合框架和
现在已重组或重新设计。他们与框架完全兼容


正式不会被弃用。


所有旧版类都重新设计为支持JDK5中的泛型。


Pratically 不会被弃用,但其他类别更适合。



旧版本。


I recently heard Vector is a Legacy class, then I read on a website that

Legacy classes are used to save Objects before Collections came.

So, why these are not called Deprecated classes, why Legacy?

解决方案

Legacy classes and interfaces are the classes and interfaces that formed the collections framework in the earlier versions of Java and how now been restructured or re-engineered. They are fully compatible with the framework.

Formally are not deprecated.

All legacy classes were re-engineered to support generic in JDK5.

Pratically are not deprecated, but there are other classes more appropriate.

Legacy = heritage of old java version.

这篇关于什么是Java中的遗留类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆