摘要:
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)
浙公网安备 33010602011771号