摘要: 这个程序涉及到IO流,很重要,要记下来。 1 构造FileInputStream 和FileOutputStream 对象,初始值为null 2 并且写好文件位置,注意文件位置的写法 3 创建字节素组 4 fis输入流的read(bytes) 方法,以及fos输出流的write方法 5 fos的fl 阅读全文
posted @ 2018-10-25 23:28 sunnybowen 阅读(328) 评论(0) 推荐(0) 编辑
摘要: public class FileTest { public static void main(String[] args) { Scanner scan =new Scanner(System.in); int week = scan.nextInt(); switch(week) { case 1:System.ou... 阅读全文
posted @ 2018-10-25 23:21 sunnybowen 阅读(261) 评论(0) 推荐(0) 编辑
摘要: public class FileTest { public static void main(String[] args) { int[] a= {71,2,1,98,2,8}; getMax(a); } public static int getMax(int[] arr) { int max=0; for(in... 阅读全文
posted @ 2018-10-25 23:14 sunnybowen 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 现在很多技术都比较新,像所谓的大数据,区块链,人工智能,但事实上接触了以后其实也没那么难。传统的技术还是很有用的。在公司,其实接触到多高级的技术,取决于自己的能力。 找工作也看出来了,培训班尽量不要报!!!在工作中学。Java系列学好了就很厉害了。就能找到很好的工作了。等以后有机会或者有余力再接触高 阅读全文
posted @ 2018-10-25 23:01 sunnybowen 阅读(2336) 评论(0) 推荐(0) 编辑
摘要: public class FileTest { public static void main(String[] args) { /* int n=9; byte b=(byte)n; */ int n=298; byte b=(byte)n; System.out.print... 阅读全文
posted @ 2018-10-25 22:59 sunnybowen 阅读(130) 评论(0) 推荐(0) 编辑
摘要: package com.bowen.dong; /** * 1 字符串常量赋值 * 2 String类的构造方法 * String() 创建一个String类对象 * String(String s) 创建一个String对象。指定值 * String(char[] chs) * @author bw * */ public cla... 阅读全文
posted @ 2018-10-25 22:56 sunnybowen 阅读(334) 评论(0) 推荐(0) 编辑
摘要: file.getPath(); getName(); isFile(), exists(); String[] s=f.list() 这些方法不要记,敲代码时可以根据API或者是提示选择自己需要的 阅读全文
posted @ 2018-10-25 22:53 sunnybowen 阅读(129) 评论(0) 推荐(0) 编辑
摘要: package com.bowen.dong; import java.io.IOException; import java.util.Properties; import java.util.Set; /** * * @author bw * */ public class Test { public static void main(String[] args) thro... 阅读全文
posted @ 2018-10-25 22:50 sunnybowen 阅读(648) 评论(0) 推荐(0) 编辑
摘要: public class Person { int age =10; public void speak() { int age = 90; System.out.println("大家好,我今年"+age+"岁了"); } 阅读全文
posted @ 2018-10-25 22:41 sunnybowen 阅读(122) 评论(0) 推荐(0) 编辑
摘要: public class FileTest { public static void main(String[] args) { int sum=0; for(int i=1;i<=100;i++) { if(i%2!=0) { continue; }else { ... 阅读全文
posted @ 2018-10-25 22:37 sunnybowen 阅读(230) 评论(0) 推荐(0) 编辑
摘要: package com.bowen.dong; import java.util.Properties; import java.util.Set; /** * @author bw * */ public class Test { public static void main(String[] args) { // 计算程序在进行求和操作时所耗费的时间 ... 阅读全文
posted @ 2018-10-25 22:34 sunnybowen 阅读(906) 评论(0) 推荐(0) 编辑
摘要: package a; /** * 枚举类 * @author bw * */ public enum Enum { A,B,C,D,E } 阅读全文
posted @ 2018-10-25 22:08 sunnybowen 阅读(277) 评论(0) 推荐(0) 编辑