It is better to use their new unsynchronized replacements:

  • ArrayList or LinkedList instead of Vector
  • Deque instead of Stack
  • HashMap instead of Hashtable
  • StringBuilder instead of StringBuffer

Noncompliant Code Example

Vector cats = new Vector();

Compliant Solution

ArrayList cats = new ArrayList();

Exceptions

Use of those synchronized classes is ignored in the signatures of overriding methods.

@Override
public Vector getCats() {...}

最新文章

  1. js 同for一样效果 (延迟)每秒循环一次 追加
  2. G:数字三角形
  3. shell获取ip
  4. 读javascript高级程序设计12-HTML5脚本编程
  5. 【转】常用css命名规则
  6. How to pass selected records from form to dilog in AX 2012
  7. 郝斌老师的SQL教程
  8. NOIP2006 2k进制数
  9. Python中else语句块(和if、while、for、try搭配使用)
  10. 【学习笔记】【oc】Block
  11. Hyperledger Fabric、Corda和以太坊对比
  12. ASP.NET MVC页面报错System.InvalidOperationException The view found at '~/Views/Home/Index.cshtml' was not created.
  13. FTP做作业用到的知识点:
  14. 我看C#的Equals()和GetHashCode()方法
  15. restTemplate 发送http post请求带有文件流、参数
  16. mysql select in 怎么优化
  17. 2018项目UML设计-课堂实战
  18. OAuth2.0标准类库汇总
  19. js 加alert后才能执行方法
  20. php-config

热门文章

  1. Kudu系列: Kudu主键选择策略
  2. C# 数据类型之 String(字符串)
  3. 【U3d】Tiled2Unity 使用Tips
  4. 【演变】Ajax(AjAj)到WebSocket
  5. sql -leetcode 178. Rank Scores
  6. Expression 生成 Lambda
  7. [C++]头文件<algorithm>
  8. 在vscode上 运行typescript 文件
  9. luogu P4156 [WC2016]论战捆竹竿
  10. artTemplate/template.js模板将时间戳格式化为正常的日期