stackoverflow上Java相關回答整理翻譯
stackoverflow-Java-top-qa
對stackoverflow上Java相關、投票數TOP100的問答進行翻譯,歡迎點star,我們會持續更新!!!為了讓“翻譯”更有意義,給閱讀者帶來更多、更有效的收獲,我們會有一些加工: 例如,對問題進行分類,整合多個答案、刪除冗余內容、加上自己的驗證結果、心得等等
對于參與翻譯的人,這也是很好的一個學習、理解過程,歡迎大家一起來翻譯</pre>
如何參與翻譯(歡迎加入翻譯組QQ群485011036)
如何參與:
- 請從下文“待翻譯問題鏈接”中尋找你感興趣的問答進行翻譯。翻譯好的問答,放到contents目錄下,無需更新readme.md文檔。之后提一個PR,我會對你的翻譯做一個審校,并更新到readme中。
- 另外,為了避免多人重復新翻譯一個問題,你可以提issue,說明你計劃翻譯的問題及時間點,我可以先更新到下面的”未翻譯問題“中,說明已有人領了這個問題。當然,也不一定要提issue,一般情況下,只要及時提pr,我及時審核,出現”撞車“的概率并不高。
一些基本的約定:
- 文檔的文件名,和stackoverflow上的url保持一致。例如,http://stackoverflow.com/questions/8710619/java-operator 的文件名, 就是java-operator.md
- 在每篇翻譯文檔內容的最后,要附上stackoverflow的原文鏈接
每個人可以做(但不限于):
- 找未翻譯的問題進行翻譯
- 優化已翻譯的問題
- 輸出問答精簡匯總版(把所有的問答集中到一個md文件,然后盡量精簡,讓別人可以在一天內把這100個問題的精髓都看完)
- 輸出gitbook版本(現在直接在github上查看,體驗不好)
目錄
基礎語法
- Java += 操作符實質
- 將InputStream轉換為String
- 將數組轉換為List
- 如何遍歷map對象
- public,protected,private,不加修飾符。有什么區別呢?
- 如何測試一個數組是否包含指定的值?
- 重寫(Override)equlas和hashCode方法時應考慮的問題
- 從一個多層嵌套循環中直接跳出
- 如何將String轉換為Int
- 如何分割(split)string字符串
- 在java中如何對比(compare)string
Map<Key,Value>
基于Value值排序- `HashMap和Hashtable的區別
- 如何便捷地將兩個數組合到一起
- Java 是否支持默認的參數值
- Java 產生指定范圍的隨機數
- JavaBean 到底是什么
- wait()和sleep()的區別
- 能否在一個構造器(
constructor
)中調用另一個構造器 finally
代碼塊總會被執行么- 如何將String轉換為enum
- 在Java中聲明數組
- 反射是什么及其用途
- 為什么不能用string類型進行switch判斷
- 比較java枚舉成員使用equal還是==
編程技巧
- 去掉煩人的“!=null"(判空語句
- 獲取完整的堆棧信息
- 如何用一行代碼初始化一個ArrayList
- 初始化靜態map
- 給3個布爾變量,當其中有2個或者2個以上為true才返回true
- 輸出 Java 數組最簡單的方式
- 為什么以下用隨機生成的文字會得出 “hello world”?
- 什么在java中存放密碼更傾向于char[]而不是String
- 如何避免在JSP文件中使用Java代碼
- Java 源碼里的設計模式
- 如何產生一個隨機的字母數字串作為 session 的唯一標識符
- 如何創建單例
- 實現Runnable接口 VS. 繼承Thread類
網絡
性能
測試
Android
待翻譯問題鏈接(還剩x問題)
- Why is subtracting these two times (in 1927) giving a strange result?
- Proper use cases for Android UserManager.isUserAGoat()?
- Creating a memory leak with Java [closed]
- Why is printing “B” dramatically slower than printing “#”?
- How can I create an executable jar with dependencies using Maven?
- Why is executing Java code in comments with certain Unicode characters allowed?
- Dealing with “java.lang.OutOfMemoryError: PermGen space” error
- Convert a String to an enum in Java
- Android SDK installation doesn't find JDK
- Java inner class and static nested class
- 'Must Override a Superclass Method' Errors after importing a project into Eclipse
- Fastest way to determine if an integer's square root is an integer
- How to fix: Unsupported major.minor version 51.0 error?
- How to generate a random alpha-numeric string?
- Comparing Java enum members: == or equals()?
- Failed to load the JNI shared Library (JDK)
- How to create a Java String from the contents of a file?
- How can I convert a stack trace to a string?
- How do you assert that a certain exception is thrown in JUnit 4 tests?
- What exactly is Apache Camel?
- How can I permanently have line numbers in IntelliJ?
- How do servlets work? Instantiation, shared variables and multithreading
- Access restriction on class due to restriction on required library rt.jar?
- How do I discover memory usage of my application in Android?
- How can I generate an MD5 hash?
- Uncatchable ChuckNorrisException
- Can I add jars to maven 2 build classpath without installing them?
- Update Eclipse with Android development tools v. 23
- Setting multiple jars in java classpath
- Iterating through a list, avoiding ConcurrentModificationException when removing in loop
- Is null check needed before calling instanceof
- How does the Java for each loop work?
- What is the Java equivalent for LINQ?
- Hibernate hbm2ddl.auto possible values and what they do?
- How to round a number to n decimal places in Java
- How can I pad an integers with zeros on the left?
- Sort ArrayList of custom Objects by property
- What's the difference between @Component, @Repository & @Service annotations in Spring?
- Why is Java Vector class considered obsolete or deprecated?
- Efficiency of Java “Double Brace Initialization”?
- Why does this go into an infinite loop?
- When and how should I use a ThreadLocal variable?
- decompiling DEX into Java sourcecode
- How to create a generic array in Java?
- Why does Math.round(0.49999999999999994) return 1
- Eclipse: Set maximum line length for auto formatting?
- What is the difference between a soft reference and a weak reference in Java?
- How to create a file and write to a file in Java?
- What is the equivalent of the C++ Pair in Java?
- What is the difference between JSF, Servlet and JSP?
- How do I “decompile” Java class files?
- Useful Eclipse Java Code Templates [closed]
- Which @NotNull Java annotation should I use?
- How to call SOAP web service in Android
contributors
thx a lot:)
more link
To Be Continue ...
giantray
Email: lizeyang@foxmail.com
Blog: http://blog.csdn.net/lizeyang
2015-08-18 于珠海
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!