摘要: package com.chongrui.test;/*while用法一例 * *///import java.util.Scanner;public class TypeConvertion { public static void main(String[] args){ //public st 阅读全文
posted @ 2016-12-27 23:32 tantanba 阅读(124) 评论(0) 推荐(0) 编辑
摘要: package com.chongrui.test;/*为新员工分配部门 * */import java.util.Scanner;public class TypeConvertion { public static void main(String[] args){ Scanner scan = 阅读全文
posted @ 2016-12-27 23:11 tantanba 阅读(224) 评论(0) 推荐(0) 编辑
摘要: package com.chongrui.test;/*验证信息登陆的合法性 * */import java.util.Scanner;public class TypeConvertion { public static void main(String[] args){ Scanner scan 阅读全文
posted @ 2016-12-27 22:49 tantanba 阅读(118) 评论(0) 推荐(0) 编辑
摘要: package com.chongrui.test;/*运用SWITCH语句打印星期几的单词 * */ public class TypeConvertion { public static void main(String[] args){ System.out.println("今天星期几"); 阅读全文
posted @ 2016-12-27 17:26 tantanba 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-12-27 17:13 tantanba 阅读(189) 评论(0) 推荐(0) 编辑
摘要: package com.chongrui.test;/* 声明两个变量并赋值计算出矩形的面积 * */ public class TypeConvertion { public static void main(String[] args){ double x = 3.5; double y = 1 阅读全文
posted @ 2016-12-27 17:06 tantanba 阅读(243) 评论(0) 推荐(0) 编辑
摘要: package com.chongrui.test;/* * 不用*用移位运算符计算21*16的数值是多少 * java中有三种移位运算符 << : 左移运算符,num << 1,相当于num乘以2 >> : 右移运算符,num >> 1,相当于num除以2 >>> : 无符号右移,忽略符号位,空位 阅读全文
posted @ 2016-12-27 16:28 tantanba 阅读(917) 评论(0) 推荐(0) 编辑
摘要: package com.chongrui.test;/* * 经典实例,计算球形的面积和体积 * 面积和体积的公式:v3=4.0/3.0*PI*r*r*r s2=4.0*PI*r*r * * */import java.util.Scanner;public class TypeConvertion 阅读全文
posted @ 2016-12-27 15:46 tantanba 阅读(924) 评论(0) 推荐(0) 编辑