上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: public class Count3Quit{ //从数组的角度 public void m1(){ boolean[] child = new boolean[500]; for(int i=0;i<child.length;i++){ child[i] = true; } int count 阅读全文
posted @ 2020-02-21 19:09 yxfyg 阅读(541) 评论(0) 推荐(0)
摘要: import java.util.*; public class OrderDate{ public static void main(String[] args){ Date[] days = new Date[5]; days[0] = new Date(2020,1,1); days[1] = 阅读全文
posted @ 2020-02-21 10:23 yxfyg 阅读(296) 评论(0) 推荐(0)
摘要: public class OrderNumber{ public static void main(String[] args){ if(args == null){ System.out.println("错误!没有检测到数据输入"); System.exit(-1); } if(args.len 阅读全文
posted @ 2020-02-20 17:04 yxfyg 阅读(298) 评论(0) 推荐(0)
摘要: public class Fibonacii{ public int m1(int n){ if(n == 1||n == 2){ return 1; } return m1(n-1) + m1(n-2); } public int m2(int n){ if(n == 1||n == 2){ re 阅读全文
posted @ 2020-02-19 20:54 yxfyg 阅读(171) 评论(0) 推荐(0)
摘要: public class GetPrime{ public void m1(){ boolean flag = true; for(int i=101;i<200;i+=2){ flag = true; for(int j=3;j<i;j++){ if(i%j == 0){ flag = false 阅读全文
posted @ 2020-02-19 19:01 yxfyg 阅读(215) 评论(0) 推荐(0)
摘要: public class BeDivided { public void m1(){ int count = 0; for(int i=1;i<=100&&count<5;i++){ if(i%3 == 0){ count++; System.out.print(i+" "); } } } publ 阅读全文
posted @ 2020-02-19 18:02 yxfyg 阅读(638) 评论(0) 推荐(0)
摘要: public class OddSum{ //计算1+2+3+...+99的值 public void odd1(){ int result = 0; for(int i=1;i<=99;i++){ result += i; } System.out.println(result); } //计算1 阅读全文
posted @ 2020-02-19 15:42 yxfyg 阅读(282) 评论(0) 推荐(0)
摘要: 输出 HelloWorld! public class HelloWorld{ public static void main(String[] args){ System.out.println("HelloWorld!"); } } 阅读全文
posted @ 2020-02-19 12:57 yxfyg 阅读(82) 评论(0) 推荐(0)
摘要: 1.在java,对于数据的输入/输出操作以流方式进行。JDK中提供了各种各样的流类,用于获取不同种类的数据,程序中通过标准的方法输入/输出数据 2.从不同角度对流分类: 数据流的方向:输入流和输出流(站在程序的角度看) 处理数据单位:字节流和字符流 功能:节点流和处理流 3.JDK提供的所有流类型位 阅读全文
posted @ 2020-02-19 11:09 yxfyg 阅读(104) 评论(0) 推荐(0)
摘要: 1.JDK提供的容器API位于java.util包内 2.容器API的类图结构 3.向实现了Collection接口的容器中装元素采用一个一个装入的形式,向实现了Map接口的容器中装元素采用成对装入的形式 4.实现了Set接口的容器中的元素没有顺序且不可以重复,实现了List接口的容器中的元素有顺序 阅读全文
posted @ 2020-02-16 19:27 yxfyg 阅读(98) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 下一页