易截截图软件、单文件、免安装、纯绿色、仅160KB

Java编码规范(The Elements of Java Style)

Genaral Principles 一般约定
1.Adhere to the style
of the original.
保持最初的样式。
2.Adhere to the Principle of Least
Astonishment.
遵守最小惊奇原则。
3.Do it right the first time.

第一次就应当做好。
4.Document any deviations.
对于任何背离都应当文档注释。
Formatting
Conventions 格式约定
5.Indent nested code.
约束嵌套代码。
6.Break up long lines.
拆分长行。
7.Include white space.

包含空格。
8.Do not use "hard" tabs.
不要使用tab键。
Naming
Conventions 命名约定
9.Use meaningful names.
使用有意义的名称。
10.Use familiar names.
使用熟悉的名称。
11.Question excessively
long names.
不要使用过长的名称。
12.Join the vowel generation.

加入元音字母。
13.Capitalize only the first letter in acronyms.

只对简称的第一个字母大写。
14.Do not use names that differ only in case.

不要使用只依赖于大小写来区分的名称。
Package Names  包命名
  15.Use
the reversed, lowercase form of your organization's Internet domain
name as the root qualifier for your package names.
  采用你组织的Internet域名
的反转、小写形式作为包名称的根限定词。
  16.Use a single, lowercase word as the root
name of each package.
  使用一个唯一的小写单词作为每个包的根名称。
  17.Use the
same name for a new version of a package, but only if that new version
is still binary compatible with the previous versin, otherwise, use a
new name.
  只有当包的新版本仍然与旧版本兼容时,对于包的新版本使用相同的名称,否则使用新名称。
  
Type Names 类型命名
  18.Capitalize the first letter of
each word that appears in a class or interface name.
  对于类和接口名称只对每个单词
的第一个字母大写。
  
  Class Names  类命名
   19.Use
nouns when naming classes.
   使用名词来命名类。
  
   20.Pluralize the
names of classes that group related attributes,


相关文档:

ubntu下java中文乱码解决

cd /usr/lib/jvm/java
-1.5.0-sun-1.5.0.15/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo cp /usr/share/fonts/truetype/arphic/uming.ttc /usr/lib/jvm/java
-1.5.0-sun-1.5.0.15/jre/lib/fonts/fallback
sudo mkfontdir
sudo mkfontscale ......

Java调用Linux命令行若干实例

 Executing a CommandSee also e90 Reading Output from a Command.
try {
// Execute a command without arguments
String command = "ls";
Process child = Runtime.getRuntime().exec(command);

// Execute a command with an argument
command = "ls /tmp"; ......

优化Java中的正则表达式

原文地址: http://www.javaworld.com/javaworld/jw-09-2007/jw-09-optimizingregex.html
       
如果你花费了数小时和正则表达式做斗争,只是为了让它完成它几秒内就可以完成的匹配,那么这篇文章正是为你量身定做的。Cristian
Mocanu指出了在什么地方正则模式匹配会发生延迟 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号