![](http://www.dearbook.com.cn/book/BookImage/lastTS0091319__.jpg)
![](https://i-blog.csdnimg.cn/blog_migrate/04aa6303bb449439cb20a292f17af803.png)
【图灵图书推荐】 Java解惑 Java教程(第4版)
“Java教父”Joshua Bloch带你深入Java语言奇境 Sun公司官方指定教材即将出版!涵盖JavaSE 6
因为审稿中发现一个技术问题,查询到Sun公司网站上的Java文档,偶然发现了这个对 Java SE 6知识的小测试。大家不妨试一试。
题目包括:
- Java SE 6平台上能够使用哪种脚本语言?
- 什么是Unicode文本的规范化?
- 怎样启动计算机上的默认浏览器查看特定URL?
- 如何给JTable的内容排序?
- 使用Java API for XML Web Services (JAX-WS) 2.0将一个方法发布为Web服务操作,应该使用哪个注解(annotation)?
- ……
应该说不是非常深,但是涉及面广。由于都是选择题,我虽然对Java 6没有太多经验,还是答了个八九不离十。你呢?
其实学习中多进行这种测试是非常重要的,Java语言本身方面的测试题最好的来源当然是“Java教父”Joshua Bloch(JavaSE5的开发老大,Java Collection API的开发者,目前是Goolge Java方面的老大)的《Java解惑》一书。里面的题目既深入又有趣。
【20070713更新】今天又发现一篇 关于Java面试题的文章,来自Java Developer‘s Journal。其中题目的深度要好得多,一共30道。其中星号的多少表示难度。题目包括:
* Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?
* Q2. What's the difference between an interface and an abstract class?
* Q4. Explain the usage of the keyword transient?
* Q5. How can you force garbage collection?
* Q6. How do you know if an explicit object casting is needed?
* Q7. What's the difference between the methods sleep() and wait()?
……
* Q20. How can a subclass call a method or a constructor defined in a superclass?
……
** Q22. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?
** Q25. If you're overriding the method equals() of an object, which other method you might also consider?
** Q29. There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?
……
【延伸阅读】
Java教父Joshua Bloch访谈
一本你肯定可以读懂的Java图书II
新闻:Java开源,主将辞职
2006 Java回顾与展望
《Java解惑》上市,大家一起来做Java思维体操!