摘要:
import java.util.ArrayList;import java.util.List;public class SubSetCount { public static void main(String[] args) { String test = new String("ABCD... 阅读全文
摘要:
题目:3个线程名字分别是A,B,C 现在在console上连续打印10次 ABC 。public class Test { public static void main(String[] args) { Thread a = new Thread(new Task("A",0)); Thread b = new Thread(new Task("B",1)); Thread c = new Thread(new Task("C",2)); a.start(); b.start(); c.start(); } static class 阅读全文
摘要:
public class BinarySort { public static void main(String[] args) { int[] array = {1,2,4,6,8,12,15,23}; System.out.println(binarysort(array,16)); } private static int binarysort(int[] array,int target){ int low = 0; int high = array.length - 1; while(low <= high){ int middle = ( high +... 阅读全文