面试题的道与术

1.不卑不亢。不卑:此处不留爷,自有留爷处。不亢:要低调,不要对着干。

2.工资根据简历来要。

3.做面试题的最最主要的目的:展现自己的水平和特色,[b]拿到下次面谈的机会[/b],而不是100%答对。
 i += i++;

解答:抱歉,我平时总是写项目写的比较多,这方面的东西没太研究和关注,如果你愿意给我时间的话,我可以查阅java虚拟机相关的知识,再去亲自做实验告诉你结果。


try{
system.exit();
} catch{
system.out.println("wrong");
}

解答:抱歉,我平时总是写项目写的比较多,这方面的东西没太研究和关注,如果你愿意给我时间的话,我可以去试,加断点然后去debug,肯定能知道结果。

4.用JDBC连接任意数据库并输入结果。
public class TestPrepStmt {

public static void main(String[] args) {
if(args.length != 3) {
System.out.println("Parameter Error! Please Input Again!");
System.exit(-1);
}

int deptno = 0;

try {
deptno = Integer.parseInt(args[0]);
} catch (NumberFormatException e) {
System.out.println("Parameter Error! Deptno should be Number Format!");
System.exit(-1);
}

String dname = args[1];
String loc = args[2];

PreparedStatement pstmt = null;
Connection conn = null;
try {
Class.forName("com.mysql.jdbc.Driver");
//new oracle.jdbc.driver.OracleDriver();
conn = DriverManager.getConnection("jdbc:mysql://localhost/mydata?user=root&password=root");
pstmt = conn.prepareStatement("insert into dept values (?, ?, ?)");
pstmt.setInt(1, deptno);
pstmt.setString(2, dname);
pstmt.setString(3, loc);
pstmt.executeUpdate();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if(pstmt != null) {
pstmt.close();
pstmt = null;
}
if(conn != null) {
conn.close();
conn = null;
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}

a.异常名字不记得:平时用eclipse自动生成比较多,名字怎么拼写的记不清楚了。
b.能用PreparedStatement就不用statement,前者是预编译效率高而且还支持参数
c.try catch finally

5.写JS不记得:说平常写项目的js大都是copy别人的代码过来改的,给我时间的话,我也可以写出来。

6.请描述MVC的设计思想:
简答题:请记住:[b]举例加画图[/b]

7.排序:冒择路(入)希快归堆
算法题:不会起码写思想然后写好几个循环套循环。

8。写一个链表完成插入删除等操作

9。servlet的生命周期:
[align=left] 1。整个生命周期只有一个servlet对象
2。第一次请求过来时,new出来对象来。
3。init()->service()->doGet or doPost()->destroy()[/align]

10. [color=red][i][b]笔试带小纸条[/b][/i][/color] :wink:

11。[color=red][/color]多表连接和子查询,必考。

12。数据库设计的三范式

13。常用的数据库优化方法:[b]缓存,索引[/b],sql语句的优化,分表

14。ArrayList,Vector,LinkedList的存储性能和特性
ArrayList和Vector差不多,只不过Vector是同步的,效率比较低,再说vector已经不怎么用了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值