原创 把用某符號分隔的字符串轉換成數組
常見的一道面試題:把某某符號(“,”或 “#”)分隔的字符串轉換成一個數組。 思路有兩個: (1)使用split()函數 (2)StringTokenizer 舉例:一個字符串str用逗號分隔爲:“aa,bb,cc,dd,ee,ff,g
原创 Formatting
You should take care that your code is nicely formatted. You should choose a set of simple rules that govern the format
原创 在Java中避免“!= null”語句?
原問題: 我整天都在用Java工作。在用Java編程時用的最多的語句(或者說代碼片段),就是在使用一個對象前,我都會先測試object != null(對象是否爲空)這是爲了避免拋空指針(NullPointerException) 的錯
原创 Basics of Apache Ant
what is Ant? (Ant是什麼) Apache Ant is a Java-based build tool whose mission is to drive processes described in build fil
原创 開源slides工具
there's a javascript framework for making slides in HTML+CSS, if you are a web developer https://github.com/gnab/remark
原创 Interview and English(2)
Question about Agile 1. Q: What are the benefits of Agile Software development? A: Agile methods grew out of the real
原创 Tools for Java programmers(2015)-2
5) Visualvm VisualVM is a visual tool integrating several commandline JDK tools and lightweight profiling capabilit
原创 about nodejs(2)
Intro from official website: Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scala
原创 Tools for Java programmers(2015)-1
Best Java Tools you should know about in year 2015. 1) SparkJava SparkJava is new, lightweight and powerful web applic
原创 Meaningful Names
We name variables, argumeants, classes and packages. We name source files and directories that contain them. We name ja
原创 Error Handling
Use Exceptions Rather Than Return Codes Use Unchecked Exceptions Define the Normal Flow
原创 Comments
Comments Do Not Make u for bad code Exlain yourself in code good comments
原创 如何在Java中進行字符串(String)比較
一直以來我都是用“ ==” 操作符來比較字符串。但是,我遇到了一個錯誤,用 .equals() 替換了一個 == 操作符,錯誤就解決了。 == 是不好的咩? 到底應不應該用它? 用不用的區別是什麼? -------------------
原创 Interview and English(1)
When an interview question is asked in English, will it be diffcult to answer? Found someting about how to answer top j
原创 Objects and Data Structures
Data Abstraction Data/Objects Anti-Symmetry The Law of Eemeter Data Transfer Objects