常用面试题

一、Mybatis防止sql注入

  1、预编译语句,尽量使用#{}而不是使用${}。

  2、使用存储过程,用的不多,推荐使用第一种。

二、arrayList和linkedList的区别

  1.ArrayList是实现了基于动态数组的数据结构,LinkedList基于链表的数据结构。 
  2.对于随机访问get和set,ArrayList觉得优于LinkedList,因为LinkedList要移动指针。 
  3.对于新增和删除操作add和remove,LinedList比较占优势,因为ArrayList要移动数

三、

  

原文地址:https://www.cnblogs.com/fengmao/p/8561646.html