今天去逛论坛 时发现了一个很有趣的问题:谁能给我我解释一下这段程序的结果为什么是:2.而不是:3代码如下:class Test { public int aaa() { int x = 1; try { return ++x; } catch (Exception e) { } fina...
分类:
其他好文 时间:
2015-04-01 23:35:36
阅读次数:
188
命名规范tags正式版 REL-X.X.Xbranches发版前 RB-X.X.X新功能 TRY-XXX修BUG BUG-XXXXtrunk开发使用注意事项负责而谨慎地提交自己的代码(先更新后提交)SVN更新的原则是要随时更新,随时提交。当完成了一个小功能,能够通过编译并且并且自己测试之后,谨慎地提...
分类:
其他好文 时间:
2015-04-01 17:19:00
阅读次数:
119
1 //屏蔽右键菜单 2 document.oncontextmenu = function (event) { 3 if (window.event) { 4 event = window.event; 5 } try { 6 ...
分类:
Web程序 时间:
2015-04-01 17:11:23
阅读次数:
114
首先让我们搞懂两组概念:try catch finally和return1.try catch finally首先说try catch,(1)try语句 ,try语句用来包围可能出现异常的代码片段. try是发现问题的语句,发现异常后会跳入到catch{}中,如下:try{ 可能出现异常的代码片段....
分类:
其他好文 时间:
2015-04-01 17:10:02
阅读次数:
135
1 try 2 { 3 DBUtility.CommandInfo dbcom = new DBUtility.CommandInfo(); 4 List strStranLis...
分类:
数据库 时间:
2015-04-01 17:02:51
阅读次数:
172
/// /// 导出功能 /// /// /// protected void btn_export_Click(object sender, EventArgs e) { try { string st...
分类:
其他好文 时间:
2015-04-01 16:53:42
阅读次数:
81
一个程序要保持稳定运行必须要有异常处理,本文将简单介绍Python中的try…except..异常处理语句的使用。...
分类:
编程语言 时间:
2015-04-01 15:34:23
阅读次数:
169
结论: 从面相对象编程的角度考虑,拷贝构造函数调用重载赋值操作符,重载赋值操作符调用拷贝构造函数的写法都是没有意义的。应该避免。Don't try to implement one of the copying functions in terms of the other. Instead, pu...
分类:
编程语言 时间:
2015-04-01 15:14:08
阅读次数:
141
1.多用try,catch;不要一个try,catch包含所有内容 好处:不同模块抓取不同异常,某一模块异常挂了,不影响其他模块的程序的进行 2.多写几个catche;尽量不要使用Exception这个大异常去包容所有异常 不要为了追求代...
分类:
编程语言 时间:
2015-04-01 13:40:33
阅读次数:
149
public void saveMyBitmap(String bitName,Bitmap mBitmap){ ??File f = new File("/sdcard/" + bitName + ".png"); ??try { ???f.createNewFile(); ??} catch (IOException e) { ???// TODO Auto-ge...
分类:
移动开发 时间:
2015-04-01 00:32:38
阅读次数:
137