`
在水伊方
  • 浏览: 107530 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论
文章列表
以下几点是网上的一些关于attribute的解释: 1)应用前提,attribute只有在设置了name后才有意义。2)attribute可以实现对象的重用,即如果设置了attribute属性,在创建actionform是,会先去查找相应的scope中是否有此对象,如果有,则重用,否则创建新的对象。3)当你将创建的acitonForm保存到相应的scope(默认是保存在session中)中时,你想用一个更有意义的名字来访问它时,它就有意义了。   例如:<actionattribute="newUserLoginForm"name="userLoginF ...
Java中求阶乘的算法 1.一般算法: public class Factorial { public static int factorial(int n) { if (n < 0 || n > 16) { System.err.println("n must be great than 0 and less than 17"); return -1; } else if (n == 0) { return 1; } else { int result = 1; for (int i = 1; i ...
关于switch的参数类型         switch(expr1)中,expr1是一个整数表达式,整数表达式可以是int基本类型或Integer包装类型,由于,byte,short,char都可以隐含转换为int,所以,这些类型以及这些类型的包装类型也是可以的。因此传递给 switch 和 case 语句的参数应该是 int、 short、 char 或者 byte。   long,string 都不能作用于swtich。         在jdk 1.7中switch的参数类型可以是字符串类型。      
Global site tag (gtag.js) - Google Analytics