上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: public class DateTest { /* * 日期格式 常用的两种 * yyyy-MM-dd * yyyy/MM/dd */ public static void main(String[] args) throws ParseException { //01.Date 转换成字符串 D 阅读全文
posted @ 2017-10-31 14:45 ★半支烟`☆ 阅读(258) 评论(0) 推荐(0)
摘要: Collections工具类的使用 创建测试类 3.map遍历的效率比较 汉字的排序 阅读全文
posted @ 2017-10-31 14:44 ★半支烟`☆ 阅读(116) 评论(0) 推荐(0)
摘要: Map的泛型集合 创建Student实体类 创建测试类 阅读全文
posted @ 2017-10-31 14:42 ★半支烟`☆ 阅读(132) 评论(0) 推荐(0)
摘要: List 接口存储一组不唯一(可以重复),有序(插入顺序)的对象 01. ArrayList实现了长度可变的数组,在内存中分配连续的空间。遍历元素和随机访问元素的效率比较高 通过看ArrayList的源码得知: /** * Constructs an empty list with an initi 阅读全文
posted @ 2017-10-31 14:41 ★半支烟`☆ 阅读(198) 评论(0) 推荐(0)
摘要: public class OrderMsg { public static void main(String[] args) throws Exception { /** * 订餐人姓名、选择菜品、送餐时间、送餐地址、订单状态、总金额 * 01.创建对应的数组 * 02.数组的初始化 * 03.显示 阅读全文
posted @ 2017-10-31 14:30 ★半支烟`☆ 阅读(575) 评论(0) 推荐(0)
摘要: /** * 求数组中的最大值 */ @Test public void test14(){ //定义一个数组 参赛的选手 int [] nums={50,20,30,80,100,90}; //定义一个擂主 int max=0; //循环打擂 for (int i = 0; i < nums.len 阅读全文
posted @ 2017-10-31 14:24 ★半支烟`☆ 阅读(369) 评论(0) 推荐(0)
摘要: public class Double01 { /** * 若有3个班级各4名学员参赛, * 如何计算每个班级参赛学员的平均分? */ public static void main(String[] args) { // 创建一个2维数组保存数据 double[][] scores = new double[3... 阅读全文
posted @ 2017-10-31 14:14 ★半支烟`☆ 阅读(502) 评论(0) 推荐(0)
摘要: // 三种循环 来实现 100以内的偶数和 public static void main(String[] args) { // 01.使用while循环 int num = 0; int sum = 0; // 求和 while (num <= 100) { // 找到偶数并相加 if (num 阅读全文
posted @ 2017-10-31 14:10 ★半支烟`☆ 阅读(462) 评论(0) 推荐(0)
摘要: public class SwitchDemo01 { /** * 韩嫣参加计算机编程大赛 如果获得第一名,将参加麻省理工大学组织的1个月夏令营 如果获得第二名,将奖励惠普笔记本电脑一部 如果获得第三名,将奖励移动硬盘一个 否则,不给任何奖励 */ public static void main(String[] arg... 阅读全文
posted @ 2017-10-31 14:07 ★半支烟`☆ 阅读(1108) 评论(0) 推荐(0)
摘要: public class Demo01Change { public static void main(String[] args) { /** * 实现等量的转换 */ int a = 50; // 可乐 int b = 100; // 雪碧 // 创建空杯子 ... 阅读全文
posted @ 2017-10-31 14:06 ★半支烟`☆ 阅读(286) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 下一页
··