03 2016 档案

摘要:a b、使MAXPRIMES为3,这样n=3时无法检测出数组越界,当n=5时才能正常检测 c、 t3=(n=1) d、节点覆盖: TR={1,2,3,,4,5,6,7,8,9,10,11,12,13,14} 边覆盖:TR={(1,2),(2,3),(2,11),(3,4),(4,5),(5,7),( 阅读全文
posted @ 2016-03-31 13:35 shenyuelong 阅读(150) 评论(0) 推荐(0)
摘要:要求:写程序判断3个整数组成的边围成的图形是否为三角形,且判断出等边三角形,等腰三角形,不等边三角形。编写的java代码如下: public class triangle { public String f(int a, int b, int c){ if(a==0||b==0||c==0||a+b 阅读全文
posted @ 2016-03-20 00:07 shenyuelong 阅读(426) 评论(0) 推荐(0)
摘要:Below are four faulty programs. Each includes a test case that results in failure. Answer the following questions (in the next slide) about each progr 阅读全文
posted @ 2016-03-09 16:12 shenyuelong 阅读(350) 评论(0) 推荐(0)
摘要:在编写一个javaweb应用的时候,我曾经碰到一个非常头疼的问题,就是判断空值的那段代码。因为每个页面要用一个session来防止恶意的注册登录。 所以我要在相关的页面来判断这个session的值,就是这样一个简单的事情,结果却不尽如人意。刚开始,我写的是: if(request.getSessio 阅读全文
posted @ 2016-03-07 13:43 shenyuelong 阅读(253) 评论(0) 推荐(0)