码迷,mamicode.com
首页 > 编程语言 > 详细

Java面试题(1)- 高级特性

时间:2016-10-07 18:10:03      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

1. The diffrence between java.lang.StringBuffer and java.lang.StringBuilder?

java.lang.StringBuffer: thread-safe, synchronized and not so faster.

java.lang.StringBuilder: faster, performs no synchronization.

2. How to handle uncaught Exception for a thread?

@FunctionalInterface
public static interface Thread.UncaughtExceptionHandler

3. The difference between [checked exceptions] and [unchecked exceptions]?

The class Exception and any subclasses that are not also subclasses of RuntimeException are checked exceptions. Checked exceptions need to be declared in a method or constructor‘s throws clause if they can be thrown by the execution of the method or constructor and propagate outside the method or constructor boundary.

Java面试题(1)- 高级特性

标签:

原文地址:http://www.cnblogs.com/thlzhf/p/5936303.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!