摘要:
System类 Runtime类 Math类 Date类 Calendar类
阅读全文
posted @ 2016-09-10 16:00
Newbie蔡
阅读(300)
推荐(0)
编辑
摘要:
source:http://hane00.blog.163.com/blog/static/1600615220126204446809/ '\r'是回车,'\n'是换行,前者使光标到行首,后者使光标下移一格。通常用的Enter是两个加起来。下面转一篇文章。 回车和换行 今天,我总算搞清楚“回车”(
阅读全文
posted @ 2016-09-10 12:21
Newbie蔡
阅读(1042)
推荐(1)
编辑
摘要:
1 package p2; 2 3 //import static java.util.Collections.max; 4 5 import java.util.ArrayList; 6 import static java.util.Collections.*; //静态导入,其实导入的是类中的静态成员 7 import java.util.List; 8 import ...
阅读全文
posted @ 2016-09-05 20:03
Newbie蔡
阅读(200)
推荐(0)
编辑
摘要:
1 package p2; 2 3 public class ParamterDemo { 4 5 public static void main(String[] args) { 6 7 int sum1 = add(4,5); 8 int sum2 = add(4,5,6); 9 int sum3...
阅读全文
posted @ 2016-09-05 19:47
Newbie蔡
阅读(216)
推荐(0)
编辑
摘要:
1 package p2; 2 3 import java.util.ArrayList; 4 import java.util.HashMap; 5 import java.util.List; 6 import java.util.Map; 7 8 public class ForEachDemo { 9 10 public static void main(...
阅读全文
posted @ 2016-09-05 19:32
Newbie蔡
阅读(596)
推荐(0)
编辑
摘要:
1 package p2; 2 3 import java.util.ArrayList; 4 import java.util.Arrays; 5 import java.util.List; 6 7 public class ToArray { 8 9 public static void main(String[] args) { 10 1...
阅读全文
posted @ 2016-09-05 17:51
Newbie蔡
阅读(4105)
推荐(0)
编辑
摘要:
1 package p2; 2 3 import java.util.Arrays; 4 import java.util.List; 5 6 public class ArraysDemo { 7 8 public static void main(String[] args) { 9 /* 10 * Arrays:集合框架的工...
阅读全文
posted @ 2016-09-05 17:37
Newbie蔡
阅读(207)
推荐(0)
编辑
摘要:
1 package cn.itcast.p2.toolclass.collections.demo; 2 3 import java.util.ArrayList; 4 import java.util.Collections; 5 import java.util.Comparator; 6 import java.util.List; 7 import java...
阅读全文
posted @ 2016-09-05 16:38
Newbie蔡
阅读(659)
推荐(0)
编辑
摘要:
TreeMap,与TreeSet类似,可以对集合中的元素进行排序,同时保持元素的唯一性。 应注意,Comparable(实现接口,记得覆盖comparaTo方法),Comparator的使用。
阅读全文
posted @ 2016-09-05 16:28
Newbie蔡
阅读(977)
推荐(0)
编辑
摘要:
类Collections的静态方法 此类完全由在 collection 上进行操作或返回 collection 的静态方法组成。 排序 static <T extends Comparable<? super T>> void sort(List<T> list) static <T> void s
阅读全文
posted @ 2016-09-05 15:45
Newbie蔡
阅读(658)
推荐(0)
编辑