![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java基础
有媛一辈子
向 javaEE软件工程师进发
展开
-
java小程序,两数互换的两种解法。
方法1: public class NumChange { public static void main(String[] args) { int a = 23; int b = 34; int c; c = a;a = b;b = c; System.out.println("a="+a+",b="+b); } } 方法2: public class NumChang原创 2012-04-12 18:56:03 · 379 阅读 · 0 评论 -
java小程序,12345变54321
public class Text2 { public static void main(String[] args) { int num = 12345; while(num != 0){ int now = num % 10; num = num /10; System.out.print(now); } } }原创 2012-04-14 20:21:36 · 1953 阅读 · 0 评论