构造string对象 string s = new String("we are students"); string t = new String("we are students");] 用户没法输出String对象的引用 能够用已建立的String对象建立另外一个String对象 String常量的引用 字符串的并置 经常使用方法 public int length()获取String对象的字符序列长度 public boolean equals(String s)比较对象的字符序列是否相同 public int compareTo(String s)字符序列比较大小
Scanner类,StringTokenizer类,StringBuffer类,Date类,Calendar类,Math类,BigInteger类,Random类····
format方法,格式化整数,格式化浮点数
泛型类声明 class People<E>; 使用泛型类声明对象 Cone<Circle> coneOne; coneOne = new Cone<Circle>(new Circle());
链表能够感受和C语言的链表有一些类似的地方 建立链表 LinkedList<String> mylist = new Linked List<String>(); 经常使用方法 排序:public static sort(List<E> list) 按照升序排列 折半法:int binarySeach(List<T>list,T key,CompareTo<T> c) 查找有没有和key相等的元素 洗牌与旋转 public static void shuffle(List<E> list) 按洗牌算法从新随机排列 static void romate(List<E> list,int distance) 旋转表中的数据 public static void reverse(List<E> list) 翻转表中的数据
码云连接:https://gitee.com/sq943997011/BESTI.IS.Java2018git
脚本运行截图:
算法