摘要:
数组排序: 1 package com.demo.sort; 2 3 import java.util.Date; 4 5 public class Sorts { 6 7 public static void main(String[] args) { 8 // TODO Auto-generated method stub 9 /* 10 * int len=10; int arr[] = new int[len]; for (int i = 0; i < len; i++) { 11 * ... 阅读全文
摘要:
什么是多态?简单的说就是一个引用在不同情况下的多种状态! 继承多态: 1 package com.demo.polymorphism; 2 3 /** 4 * Description:继承多态 5 * 6 * @author HackerD 7 * 8 */ 9 public class Polymorphism {10 11 /**12 * @param args13 */14 public static void main(String[] args) {15 Animal animal=new dog();16 ... 阅读全文