摘要: package demo.duotai; public abstract class Pet { private int health; public Pet(int health) { this.health = health; } public int getHealth() { if (hea 阅读全文
posted @ 2016-09-28 16:40 mabelfdm 阅读(158) 评论(0) 推荐(0) 编辑
摘要: package demo.extend; class Vehicle { String type = "4w"; int maxSpeed = 100; Vehicle(){ System.out.println("this is a father construtor"); } Vehicle(S 阅读全文
posted @ 2016-09-27 17:07 mabelfdm 阅读(295) 评论(0) 推荐(0) 编辑
摘要: import java.util.Arrays; import java.util.Scanner; public class ArraySortDemo { public static void main(String[] args) { double amoMoney[] = new doubl 阅读全文
posted @ 2016-09-23 14:50 mabelfdm 阅读(104) 评论(0) 推荐(0) 编辑
摘要: public class Array2Demo { public static void main(String[] args){ int[][] arr = new int [3][4]; arr[1][2] = 78; int[][] arr1 = new int[3][]; arr1[0] = 阅读全文
posted @ 2016-09-23 13:30 mabelfdm 阅读(98) 评论(0) 推荐(0) 编辑
摘要: /** * * @author a496006 * */ public class BubbleSort { // Bubble order public static void main(String[] args) { int k; Integer[] a = { 2, 1, 6, 5, 4, 阅读全文
posted @ 2016-09-23 13:27 mabelfdm 阅读(104) 评论(0) 推荐(0) 编辑
摘要: class Car { String color = "red"; int num = 4; void run() { System.out.println("Color" + color); } } class CarDemo { public static void main(String[] 阅读全文
posted @ 2016-09-02 17:50 mabelfdm 阅读(160) 评论(0) 推荐(0) 编辑
摘要: package test1; import java.util.HashSet;import java.util.Set; public class SetCase { // List Map Set Array String[] array = { "a", "b", "c" }; public 阅读全文
posted @ 2016-08-28 21:30 mabelfdm 阅读(249) 评论(0) 推荐(0) 编辑
摘要: package test1; import java.util.ArrayList;import java.util.Collections;import java.util.List; public class ListExample { public static void main(Strin 阅读全文
posted @ 2016-08-28 21:29 mabelfdm 阅读(134) 评论(0) 推荐(0) 编辑
摘要: package test1; import java.util.HashMap;import java.util.Map;import java.util.Map.Entry; public class MapCase { public static void main(String[] args) 阅读全文
posted @ 2016-08-28 21:29 mabelfdm 阅读(100) 评论(0) 推荐(0) 编辑
摘要: public class ArrayDemoSelectSort { private void printArr(int[] arr1) { // TODO Auto-generated method stub for (int obj : arr1) { System.out.print(obj) 阅读全文
posted @ 2016-08-22 13:43 mabelfdm 阅读(127) 评论(0) 推荐(0) 编辑