摘要:
/*输出所有的水仙花数,所谓水仙花数是指一个3位数,其各个位上数 字立方和等于其本身。 例如: 153 = 1*1*1 + 3*3*3 + 5*5*5 */class ForTest3{ public static void main(String[] args){ int num1 = 0;//百 阅读全文
posted @ 2019-05-08 17:59
战胜橘子
阅读(1769)
评论(0)
推荐(0)
摘要:
/** switch语句有关规则 • switch(表达式)中表达式的值必须是下述几种类型之一:byte,short, char,int,枚举 (jdk 5.0),String (jdk 7.0); • case子句中的值必须是常量,不能是变量名或不确定的表达式值; • 同一个switch语 阅读全文
posted @ 2019-05-08 16:55
战胜橘子
阅读(1332)
评论(1)
推荐(1)
摘要:
主要运用双层for循环嵌套,进行冒泡排序 public class BubbleSortTest { public static void main(String[] args) { int[] arr = new int[]{-12,3,2,34,5,8,1}; //冒泡排序 for(int i 阅读全文
posted @ 2019-05-08 00:23
战胜橘子
阅读(38492)
评论(0)
推荐(1)

浙公网安备 33010602011771号