原创 Java抽取Word,PDF格式文件的四種武器

很多人用java進行文檔操作時經常會遇到一個問題,就是如何獲得word,excel,pdf等文檔的內容?我研究了一下,在這裏總結一下抽取word,pdf的幾種方法。 1. 用jacob 其實jacob是一個bridage,連接java和c

原创 static 和 interface的關係

static 和 interface的關係:1)內部接口是隱式的靜態的,不管你是不是用static來修飾注意:內部接口很少用到2)外部接口不能是靜態的

原创 初始化順序(Thinking in Java中的一段有意思的例子)

abstract class Glyph {  abstract void draw();  Glyph() {    System.out.prin

原创 Can inner class extends outer class, or opposite?

Q. Can inner class extends outer class, or opposite? Why we should generall

原创 Java爲什麼支持反射機制?

 學習心得:Java爲什麼支持反射機制?     選擇自 miaogang 的 Blog  Java爲什麼能夠支持Reflection?答案是Java運行時仍然擁有類型信息,它包含了這個類一切:它有哪些字段、哪些方法,各是何種保護級別等等

原创 候捷談Java反射機

Java反射機制   摘要 Reflection 是Java被視爲動態(或準動態)語言的一個關鍵性質。這個機制允許程序在運行時透過Reflection APIs取得任何一個已知名稱的class的內部信息,包括其modifiers(諸如pu

原创 Eclipse快捷鍵

作用域 功能 快捷鍵      全局 查找並替換 Ctrl+F      文本編輯器 查找上一個 Ctrl+Shift+K      文本編輯器 查找

原创 淺析Java語言中兩種異常的差別

Java 提供了兩類主要的異常:runtime exception和checked exception。所有的checked exception是從

原创 JAVA虛擬機介紹

     Java 虛擬機(JVM)是可運行Java代碼的假想計算機。只要根據JVM規格描述將解釋器移植到特定的計算機上,就能保證經過編譯的任何Jav

原创 Google搜索引擎的使用方法大全

一,GOOGLE簡介   Google(www.google.com)是一個搜索引擎,由兩個斯坦福大學博士生Larry Page與Sergey Brin於1998年9月發明,Google Inc. 於1999年創立。2000年7月份,Go

原创 if the reference of the thread is set to null.

Q. After a thread started, if the reference of the thread is set to null,wh

原创 淺談Java中this的使用

1. this是指當前對象自己。 當在一個類中要明確指出使用對象自己的的變量或函數時就應該加上this引用。如下面這個例子中: public clas

原创 In what situation, an IllegalThreadStateException will be thrown?

Q. In what situation, an IllegalThreadStateException will be thrown?A:1) If

原创 重載調用

Q. When ambiguity exists between method calls, how does compiler resolve it

原创 Constructor or not constructor?

Q. Constructor or not constructor? Please explain why the output of the fol