摘要: package com.wh.multiplication public class Multiplication Table { public static void main(String[] args) { for (int i = 1; i < 10; i++) { for (int j =1; j <=i; j++) { ... 阅读全文
posted @ 2016-09-12 20:15 奋斗的少年WH 阅读(2767) 评论(0) 推荐(0)
摘要: package com.wh.lingxing; import java.util.Scanner; public class LingXing { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for (;;) { S... 阅读全文
posted @ 2016-09-12 20:11 奋斗的少年WH 阅读(3476) 评论(0) 推荐(0)
摘要: public class Demo { public static void main(String[] args) { for (int i = 1; i < 10; i++) { for (int j =1; j <=i; j++) { if(j!=i){ System.out.print(j+ 阅读全文
posted @ 2016-09-12 15:11 奋斗的少年WH 阅读(3440) 评论(0) 推荐(0)
摘要: 方法一: long sum=0; long num=1; for (long i = 1; i <=20; i++) { for(long j=i;j>0;j--){ num=num*j; } sum+=num; num=1; } System.out.println(sum); } 方法二: lo 阅读全文
posted @ 2016-09-12 14:53 奋斗的少年WH 阅读(634) 评论(0) 推荐(0)
摘要: 1.创建web项目,添加struts2支持的类库,在web.xml中配置struts2过滤器。 2.创建名为UserAction的Action对象,并在其中编写execute()方法,代码如下所示: package com.wh.Demo; import com.opensymphony.xwork 阅读全文
posted @ 2016-09-12 13:36 奋斗的少年WH 阅读(555) 评论(1) 推荐(0)
摘要: 1.创建web项目,添加struts2支持的类库,在web.xml中配置struts2过滤器。 2.创建名为UserAction的Action对象,并分别在其中编写add()和update()方法,用于处理添加用户信息和更新用户信息的请求,并将请求返回到相应的页面,代码如下所示: package c 阅读全文
posted @ 2016-09-12 13:16 奋斗的少年WH 阅读(234) 评论(1) 推荐(0)
摘要: import java.util.Scanner; public class Demo01 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for (;;) { String a = sc 阅读全文
posted @ 2016-09-12 11:53 奋斗的少年WH 阅读(4308) 评论(0) 推荐(0)
摘要: public class Demo { public static void main(String[] args) { byte num1 = 3; byte num2 = 5; /*位预算 *num1 0011 *左移2位 1100 *右移2位 0000 */ System.out.printl 阅读全文
posted @ 2016-09-12 10:22 奋斗的少年WH 阅读(215) 评论(0) 推荐(0)