`
feiniao2029
  • 浏览: 22111 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
题目,给出一个数组,将这个数组按最大、最小、次大、次小、这样依次打印出来。       public static void printVector(Integer[] lists){//若写成int[] lists则转化成Integer[]的调用编译不通过 if(lists.length==0){ return; } int max=lists[0]; int min=lists[0]; for(int i=0;i<lists.length;i++){ if(lists[i]>max)max=lists[i]; ...
有三个线程ID分别是A、B、C,请有多线编程实现,在屏幕上循环打印10次ABCABC… package pcenshao.thread; import java.util.concurrent.Semaphore; public class SemaphoreABC {         static class T extends Thread{                 Semaphore me;         Semaphore next;                 public T(String name,Semaphore me,Semaphore next ...
Global site tag (gtag.js) - Google Analytics