摘要:
package demo.duotai; public abstract class Pet { private int health; public Pet(int health) { this.health = health; } public int getHealth() { if (hea 阅读全文
摘要:
package demo.extend; class Vehicle { String type = "4w"; int maxSpeed = 100; Vehicle(){ System.out.println("this is a father construtor"); } Vehicle(S 阅读全文
摘要:
import java.util.Arrays; import java.util.Scanner; public class ArraySortDemo { public static void main(String[] args) { double amoMoney[] = new doubl 阅读全文
摘要:
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] = 阅读全文
摘要:
/** * * @author a496006 * */ public class BubbleSort { // Bubble order public static void main(String[] args) { int k; Integer[] a = { 2, 1, 6, 5, 4, 阅读全文
摘要:
class Car { String color = "red"; int num = 4; void run() { System.out.println("Color" + color); } } class CarDemo { public static void main(String[] 阅读全文
摘要:
package test1; import java.util.HashSet;import java.util.Set; public class SetCase { // List Map Set Array String[] array = { "a", "b", "c" }; public 阅读全文
摘要:
package test1; import java.util.HashMap;import java.util.Map;import java.util.Map.Entry; public class MapCase { public static void main(String[] args) 阅读全文
摘要:
package test1; import java.util.ArrayList;import java.util.Collections;import java.util.List; public class ListExample { public static void main(Strin 阅读全文
摘要:
public class ArrayDemoSelectSort { private void printArr(int[] arr1) { // TODO Auto-generated method stub for (int obj : arr1) { System.out.print(obj) 阅读全文