摘要: 二分法查找的前提数组是有序的 1 package test; 2 3 public class BinarySearch { 4 public static void main(String[] args) { 5 int[] arr = new int[] { 12, 23, 34, 45, 56, 67, 77, 89, 90 }; 6 i... 阅读全文
posted @ 2017-09-14 20:44 九零大叔芭蕉 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 关于this的用法 this关键字只能在方法内部使用,表示对“调用方法的那个对象”的引用。 1. this调用本类中的其他方法(成员方法) 如果在一个方法中调用同一个类中另外的方法可以不使用this,如: 2.代表自身对象(当前对象) 3.this调用本类中的其他构造方法,调用时要放在构造方法的首行 阅读全文
posted @ 2017-09-14 19:13 九零大叔芭蕉 阅读(307) 评论(0) 推荐(0) 编辑