y****n 发帖数: 5 | 1 第一章 用它的时候你了解它多少.
我们大多数人都是从写procedure程序过渡来的,怎么能从我们的proc
edure情结中摆脱出来一直是一件头疼的事. 我们中很多人都是在打
着JAVA的幌子,写着VB的程序,用JAVA只是当它是一种编程语言,而对
它没有更深的认识.
我曾看到过这样一段code是检查从web页面上提交的数据是否是数字.
public boolean isNumeric(String str){
int nLength = str.length();
char chrArray = str.toCharArray();
for(int i=0; i
if((chrArray[i] >= 0x30) && (chrArray[i]<= 0x39))
continue;
else
return false;
}
}
按照procedure编程的常识,这样写程序是天经地义的事 | a****o 发帖数: 37 | 2 Aih, Why so finicky? It's your common sense, but not
everybody has it. You can say it's only a dummy book, but at
least I can not write it so fluently if I am asked to write
such a tutorial. It's in your mind, but it is already great
to be able to organize these minds and put them into words.
Performance and OO design are both important. And I bet in
many codes, neither is respected. Many people write Java
just as they write naive C code. But nobody cares as long as
the functionality is achieved |
|