javaEE基础,io,集合

idea

psvm
public static void main(String[] args) {
        
    }

sout
System.out.println("");

注释

public class helloworld {
    public static void main(String[] args) {
        //输入一个helloworld
        System.out.println("hello world");
        /*
        多行注释
         */
        /**
         * Javadoc /** 开头
         * Doc comment here for <code>SomeClass</code>
         * @param T type parameter
         * @see Math#sin(double)
         */
    }
}

javaDoc

参数信息
@author   作者名
@version  版本号
@since    指明需要最早使用的jdk版本
@param    参数名
@return   返回值情况
@throws   异常抛出情况

基本类型

public class helloworld {
    public static void main(String[] args) {
    //八大基本类型
        //整数
        int num1= 10;
				0为八进制
				0x为十六进制
        byte num2 =10;
        short num3= 10;
        long num4 = 20l;
        //小数
        float num5 = 20.2F;
        double num6 = 3.14159265358;

        //字符类型
        char name ='国';
				System.out.print((int)name);
				//强制转换为int
        String name1 = "hello";

        //布尔值
        boolean flag =true;
        boolean go = false;

    }
}

类型转换

public class helloworld {
    public static void main(String[] args) {
        int i =128;
        byte b =(byte)i;
        System.out.println(i);
        System.out.println(b);
    }
}

128
-128
——————————————————————————————————————————————————————————————————————————————————
public class helloworld {
    public static void main(String[] args) {
        int i =128;
        double b = i;
        System.out.println(i);
        System.out.println(b);
    }
}
128
128.0
————————————————————————————————————————————————————————————————————————————————————
/*
注意点:
1.不能对布尔值进行转换
2.不能把对象类型转换为不相干的类型
3.在把高容量转换到低容量的时候,强制转换
4.转换的时候可能存在内存溢出,或者精度问题!
*/
				char c ='a';
        int m=c+1;
        System.out.println(m);
        System.out.println((char) m);
98
b
————————————————————————————————————————————————————————————————————————————————————
//操作比较大的数的时候,注意溢出问题
        // JDK7新特性,数字之间可以用下划线分割
        int money = 10_0000_0000;
        int years = 20;
        int total = money*years; //-1474836480 ,计算的时候溢出了
        long total2 = money*years;//默认是int,转换之前已经存在问题了?
        long total3 = money* ((long)years);
        System.out.println(total3);

变量

type varName [=value] [,varName [=value]]
//数据类型  变量 = 值 可以用逗号隔开来申明多个同类型变量
public class helloworld {
    //实例变量:从属于对象 如果不初始化值 这个默认值位 null 或者 0
    //布尔值 默认为 false;
    //除了基本类型,其他都为null
    String name;
    int age;
    //类变量
    static double salary = 250;
    //main方法
    public static void main(String[] args) {
        //局部变量:必须声明和初始化值
        int i  =1;
        //变量类型  变量名字= new helloworld();
        helloworld helloworld= new helloworld();
        System.out.println(helloworld.age);
        //类变量 static
        System.out.println(salary);
    }
    //其他方法
    public void add(){
        System.out.println();
    }
}

**常量**
static final double   PI  =3.14;
//常量名基本为大写字母

scanner

package base;

import java.util.Scanner;

public class HelloWorld {
    public static void main(String[] args) {
       Scanner scanner=  new Scanner(System.in);
        System.out.printf("使用next方式");
        //判断用户有没有输入字符
        if(scanner.hasNext()){
            String srt = scanner.next();
            System.out.printf("输出的内容为"+srt);
        }
        //凡是属于Io流的类如果不关闭会一直占用资源.要养成好习惯用完就关掉
        scanner.close();
    }
}

next():
1、一定要读取到有效字符后才可以结束输入。
2、对输入有效字符之前遇到的空白,next()方法会自动将其去掉。
3、只有输入有效字符后才将其后面输入的空白作为分隔符或者结束符
4next()不能得到带有空格的字符串。
nextLine():
1、以Enter为结束符,也就是说nextLine()方法返回的是输入回车之前的所有字符。
2、可以获得空白。

**package base;

import java.util.Scanner;

public class HelloWorld {
    public static void main(String[] args) {
        int i = 0;
        float f = 0.1f;
       Scanner scanner=  new Scanner(System.in);
        System.out.printf("使用next方式");
        //判断用户有没有输入字符
        if(scanner.hasNextInt()){
            i  = scanner.nextInt();
            System.out.printf("输出的内容为"+i);
        }else {
            System.out.printf("输入的不是整数");
        }
        System.out.printf("请输入小数");
        if(scanner.hasNextFloat()){
            f  = scanner.nextFloat();
            System.out.printf("输出的内容为"+f);
        }else {
            System.out.printf("输入的不是小数");
        }
        //凡是属于Io流的类如果不关闭会一直占用资源.要养成好习惯用完就关掉
        scanner.close();
    }
}

       //判断输入的是不是Double,直到输入的值不是Double
        while (scanner.hasNextDouble()){

        }**

if条件选择

单选择
if(布尔表达式){
//如果布尔表达式为true将执行的语句
}
——————————————————————————————————————————————————————————————————————————————
双选择
if(布尔表达式){
//如果布尔表达式的值为true
}else{
//如果布尔表达式的值为false
}
——————————————————————————————————————————————————————————————————————————————
if多选择结构
if(布尔表达式1){
/如果布尔表达式1的值为true执行代码
}else if(布尔表达式2){
//如果布尔表达式2的值为true执行代码
}else if(布尔表达式3){
//如果布尔表达式3的值为true执行代码
}else {
//如果以上布尔表达式都不为true执行代码
}
——————————————————————————————————————————————————————————————————————————————
if嵌套
if(布尔表达式1){
如果布尔表达式1的值为true执行代码
if(布尔表达式2){
//l/如果布尔表达式2的值为true执行代码
}
}

switch选择法

switch(expression){
case value :
//语句
break;//可选
case value :
//语句
break;//可选
//你可以有任意数量的case语句
default : //可选
//语句
}

while循环

while(布尔表达式) {
//循环内容
}
//只要布尔表达式为true,循环就会一直执行下去。
public class HelloWorld {
    public static void main(String[] args) {
        //输出1-100
        int  i =0 ;
        while (i<100){
            i++;
            System.out.println(i);
        }
    }
}
————————————————————————————————————————————————————————————————————————————————————————
do {
//代码语句
}while(布尔表达式);
/*对于while语句而言,如果不满足条件,则不能进入循环。但有时候我们需要即使不满足条件,
也至少执行一次*/

for循环

for(初始化;布尔表达式;更新){
//代码语句
}
100.for
for (int i=1;i<=100;i++){
            System.out.println(i);
        }
==================================
增强型循环
for (int array : arrays) {
   System.out.print(array);
}

数组

//变量类型  变量名  = 变量值
 int[] ints;  //定义
 int inst[]; //C的写法
 ints  = new int[10];

 int[] gou = new int[10];
// length  数组长度

==============================
写一个方法
/打印数组元素
public static void printArray(int[ ] arrays)i
for(int i = 0; i < arrays. length; i++) {
system.out.print(arrays[i]+”");
}
}

---------------------------------------------------------------------------------------
二维数组
int[][] array = {{1,2},{2,3},{3,4},{4,5};

方法 oop

//kind 
public class Demo01 {
  //main method
  public static void main(String[] args) {
      new Demo01().sayHello();
      new Demo01().max(2, 3);
  }
  //void not need return
  //return method finish
  public static String sayHello(){
    System.out.println("hello world");
     return null;
  }
//如果是static可以不需要new可以直接用
  public int max(int a,int b) {
    return a>b ? a : b ;
  }
}
————————————————————————————————————————————————————————————————————————
static的method可以直接调用
kind variable =new kind; //实例化

类和对象

//kinf
public class Demo01 {
    //
    String name;
    int age;
    public void study(){
      
      System.out.println(this.name+"is study");
    }
}
——————————————————————————
//引用
public class Demo02{
public static void main(String[] args) {
    Demo01 xiao =new Demo01();
    xiao.name="inst";
    xiao.age=2;
}
   
}

异常Exception处理

异常处理的五个关键字
 try,catch,finally,throw,throws

多个异常从小到大的捕获
________________________________________
public class Demo01 {
    public static void main(String[] args) {
        int a =1;
        int b =0;

        try{ //try监控区域
            System.out.println(a/b);
        }catch (ArithmeticException e){
            System.out.println("除数不能为零");
        }catch{
				可以写多个异常

				}finally { //可以不用加
            System.out.println("finally");
					用于关闭io流、资源
        }
				if (b==0){
						//主动抛出异常,多是写在方法中
            throw new ArithmeticException();
        }
    }
//此为方法主动抛出异常交由上一级解决
public void a() throws ArithmeticException {
        {
            int c = 0;
            if (c == 0) {
                throw new ArithmeticException();
            }
        }
        ;

    }
}
_________
//自己编写 异常 Demo02
public class Demo02 extends Exception {
    //number>10 try
    private int  detail;
    public Demo02(int a) {
        this.detail = a;
    }
    @Override
    public String toString() {
        return "Demo02{" +
                "detail=" + detail +
                '}';
    }
}

//调用 Demo01
public class Demo01 {
  static void trysing(int a) throws Demo02{
    System.out.println("cuangdi:"+a);
       if(a>10){
        throw new Demo02(a);
       }
       System.out.println("ok");
  }
  public static void main(String[] args) {
    try{
      trysing(1);
    }catch(Demo02 e){
      System.out.println("Demo02"+e);
    }
    
  }
}

常用类

//返回对象的 hash值
public class Demo02{
  public static void main(String[] args) {
    Anima a = new Anima();
    Anima b = new Anima();
    System.out.println(a.hashCode());
    System.out.println(b.hashCode());
  }  
   
}
class Anima{
  private String name;
  public String getName() {
      return name;
  }
  public void setName(String name) {
    this.name = name;
  }
}

//equals 表较是否相同 用==判断大小 两个内存地址是否相等,没有很大意义
//但是现在希望用 equals判断不再比较内存地址,判断属性
/**
* 方法重写  boolean 指 基本类 布偶型
  instanceof 是是否属于的意思 
* public boolean equals(Object obj){
     如果不属于直接 flase
*   if(obj instanceof Anima){
        类型转换
*        Anima a = (Anima) obj;
*    }
*    return false; 
*   }
*/
public class Demo02{
  public static void main(String[] args) {
    Anima a = new Anima();
    Anima b = new Anima();
    a.setName("xiaohua");
    b.setName("xiaohua");
    a.setAge(1);
    b.setAge(1);
    a.setId("11101");
    b.setId("11101");

    
    System.out.println(a.equals(b));
    System.out.println(b.equals(a));
  }  
   
}
class Anima{
  private String name;
  private int age;
  private String id;
  
  public void setAge(int age) {
    this.age = age;
  }
  public void setId(String id) {
    this.id = id;
  }
  public int getAge() {
    return age;
  }
  public String getId() {
    return id;
  }
  public String getName() {
      return name;
  }
  public void setName(String name) {
    this.name = name;
  }
}

-----------------------
//已经重写
输入的是对象的属性
@Override
  public String toString() {
    return "Anima [age=" + age + ", id=" + id + ", name=" + name + "]";
  }
---------------------
String 字符串常用方法
---boolean
equals(anObject)//两个字符串进行比较是否相同
equalsIgnoreCase(anotherString)//忽略大小
contains(s)//是否包含某个字符串
startsWith(prefix)//是否包以某个字符开头
endsWith(suffix)//是否包以某个字符结尾
isEmpty()//字符串是否为空
charAt(index)//取字符串中的第 index个字符
length()//字符串长度
indexOf(str,第n个索引开始)//某个字符串在本字符中出现的索引
lastIndexOf(str)//在字符串中最后一次出现的位置
substring(beginIndex, endIndex)//从字符串中截取一个新的字符串
getBytes(StandardCharsets.*[指定字符集]);//把字符串转为 字节码
byte[] str1 = gout.getBytes(StandardCharsets.US_ASCII);
String name1= new String(str1,StandardCharsets.US_ASCII);//将字节码转为字符串
toCharArray();/将字符串转为字符数组
valueOf(obj);//将值转为字符串,如果是类将会输出 toString
toLowerCase()//将字符串转为小写
toUpperCase()//将字符串转为大写
concat(str);//字符串会拼接成一个新的字符串
replace(target, replacement)//将字符串中老的替换成新的字符
split(-)//按照规则切割字符,生成了一个数组
trim();//去除字符前后的空格
compareTo(anotherString);//按字典(字符集)顺序比较字符串,返回的是一个数字
compareToIgnoreCase(str);//按字典顺序比较字符串,忽略大小写

String Buffer

append("");//在字符串后面追加
insert(1,“”);//插入一个字符到字符串
delete(1,2);//end-1 删除字符中的几个字符
reverse();//反转字符串

Math

    Math.abs(-10);//绝对值
    Math.ceil(10.1);//大于这个数的整数
    Math.round(10.2);//四舍去五入
    Math.max(1, 2);//比较2个数的最大值
    Math.pow(10, 2);//A的B次方
    Math.random();//0-1的随即数

System

System.currentTimeMillis();//当前时间的毫秒值
System.exit(1);//非零结束运行
System.arraycopy(src, srcPos, dest, destPos, length);//复制数组

Data

SimpleDateFormat  date1 = new SimpleDateFormat();
String pattern = "yyyy-MM-dd HH:mm:ss";
//SimpleDateFormat  date1 = new SimpleDateFormat(pattern);
//date1.applyPattern(pattern);
//将字符串解析成时间对象
Date date =date1.parse("");
//将时间对象解析成字符串
Date date2 = new Date();
String format = date1.format(date2.getTime());

	 G 年代标志符
   y 年
   M 月
   d 日
   h 时 在上午或下午 (1~12)
   H 时 在一天中 (0~23)
   m 分
   s 秒
   S 毫秒
   E 星期
   D 一年中的第几天
   F 一月中第几个星期几
   w 一年中第几个星期
   W 一月中第几个星期
   a 上午 / 下午 标记符
   k 时 在一天中 (1~24)
   K 时 在上午或下午 (0~11)
   z 时区
--------------------
		Calender 对象控制
		Calendar calendar = Calendar.getInstance();
    Date time = calendar.getTime();
    System.out.println(time);
    SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd HH:mm:ss");
    System.out.println(sdf.format(time));
    calendar.add(Calendar.DAY_OF_MONTH, -3);
    calendar.set(Calendar.YEAR, 1925);
    Date time1 = calendar.getTime();
    System.out.println(time1);

正则表达式类

String str = "zifuchaung";
str1="\\d{3}"//出现3次数字
Pattern pattern = Pattern.compile(str1);
Matcher matcher =  pattern.matcher(str);
boolean a = matcher.matches();
//快速方法
------------------------------
boolean b = Pattern.matches("zifuchaung", str);
------------------------------------------------
boolean matches = str.matches("zifuchaung");

正则表达式语法

Untitled

集合

		Collection 
___________________
		Collection col1 = new ArrayList();
    Collection col2 = new ArrayList();
    col2.addAll(col1);
    col1.add(12);
    System.out.println(col1);//打印集合中的所有元素
    col1.remove(10);//直接删除某个元素
    col1.removeAll(col2);//删除与col2中相同的元素
    boolean ant1 = col1.retainAll(col2);//删除与col2中不同的元素,如果有删除返回ture
    int size =  col1.size();//查询集合中元素的个数
		boolean contains = col1.contains("12");//当前集合是否包含某个元素
    boolean containsAll= col1.containsAll(col2);//是否包含某个集合的所有元素
List  //有序性的数组ArrayList和Vector以及LinkedList
//迭代器可以使循环中改变List不会出现错误
————————————————————————————
				//Vector安全的线程,arraylist更安全的类
        Vector list = new Vector();
-------------------------------------------
				List list1 = new ArrayList();
        List newlist = new ArrayList();
        list1.add(1);
        list1.add(2);
        list1.add(2);
        list1.add(2);
        list1.add(3);
        System.out.println(list1);
        //得到迭代器
        Iterator iterator = list1.iterator();
        //循环沥泠元素
        while (iterator.hasNext()) {
            //得到List中的元素
            int next = (int) iterator.next();
            //判断是否已经存在
            if (!newlist.contains(next)) {
                newlist.add(next);
            }
        }
        System.out.println(newlist);
        }

_________________________________

Set //无序不可以重复的元素
HashSet
LinkedHashSet//可以按照存入的数据遍历
TreeSet//会按照字母自然循序排序/数字和字母比较要重写comparable接口
________________________________
				Set set1 = new HashSet();
        //添加元素(没有索引)
        set1.add("a");
        set1.add(1);
        set1.add("c");
        //查询元素,无索引 
        Object[] array = set1.toArray();
        System.out.println(Arrays.toString(array));
        //删除
        set1.remove("a");
import java.util.HashSet;
import java.util.Set;
public class demo {
    public static void main(String[] args) {
        Set set1 = new HashSet();
        Teacter t1 = new Teacter();
        Teacter t2 = new Teacter();
        t1.setAge(22);
        t2.setAge(33);
        t1.setName("jian");
        t2.setName("hua");
        set1.add(t1);
        set1.add(t2);
        System.out.println(set1);

    }
}
class Teacter{
    private String name;
    private int age;
    @Override
    public String toString() {
        return "Teacter [name=" + name + ", age=" + age + "]";
    }
    public void setName(String name) {
        this.name = name;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public String getName() {
        return name;
    }
    public int getAge() {
        return age;
    }
}
-----------------
c为集合,elements可以添加多个元素用,号分开
Collections.addAll(c, elements);
Collections.sort(list);//将集合中的元素排序,不会返回新的集合
Collections.binarySearch(list, key);//查找list中的的元素返回索引
Collections.swap(list, i, j);//实现两数的互换
Collections.reverse(list);//将集合倒序
Collections.replaceAll(list, oldVal, newVal);//替换集合中的元素 所有 oldval的都会换
package map;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;

public class demo {
    public static void main(String[] args) {
        Map map = new HashMap();
        //添加元素
        map.put(1001, "value1");
        map.put(1002, "value2");
        System.out.println(map);
        //查询数据
        Object sum = map.get(1002);
        System.out.println(sum);
        //得到map中所有的entry
        System.out.println("----------------------------");
        Set entrySet = map.entrySet();
        //遍历map1
        for (Object obj : entrySet) {
            if (obj instanceof Map.Entry) {
                Map.Entry entry = (Map.Entry) obj;
                Object key = entry.getKey();
                Object value = entry.getValue();
                System.out.println(key+"="+value);
            }
        }
        System.out.println("----------------------------");
        //遍历map2
        Set keySet = map.keySet();
        Iterator iterator = keySet.iterator();
        while (iterator.hasNext()) {
            Object key = iterator.next();
            Object value = map.get(key);
            System.out.println(key+"="+value);
        }
    }
}
----------------
				HashMap map = new HashMap();
        map.put(0001, "value");
        map.put(0002, "value");
        map.put(0003, "value");
        map.put(0004, "value");
        map.put(0005, "value");
        Collection values = map.values();
        for (Object object : values) {
            System.out.println(object);
        }

IO流

package file;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Arrays;

public class fileio {
    public static void main(String[] args) {
        // File.separator;代表斜杠
       
        File file = new File("/home/yan/IdeaProjects/javaSE"); 
        //判断文件是否存在
        boolean exists = file.exists(); 
        System.out.println(exists);
        //创建一个新的文件
        try {
            file.createNewFile();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        //判断对象是否为文件
        boolean file2 = file.isFile();
        //判断对象是否为文件夹
        boolean directory = file.isDirectory();
        //删除文件,文件夹中必须删除所有文件
        file.delete();
        //列出文件夹中的所有文件名,输出的是数组
        String[] list = file.list();
        System.out.println(Arrays.toString(list));
        //列出文件夹中的所有文件,以对象返回
        File[] listFiles = file.listFiles();
        for (File f : listFiles) {
            System.out.println("---------------------");
            System.out.println(f.getName());//文件名字
            System.out.println(f.getAbsolutePath());//绝对路径
            System.out.println(f.getPath());//相对路径
            System.out.println(f.isHidden());//是否隐藏文件
            System.out.println(f.canRead());//是否可读
            System.out.println(f.lastModified());//文件最后修改时间
            Date time = new Date(f.lastModified()); 
            SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
            System.out.println(df.format(time));
        }
        //创建文件夹
        File f1 = new File("/home/yan/IdeaProjects/javaSE/into");
        f1.mkdir();
        //重命名,移动
        f1.renameTo(new File("/home/yan/IdeaProjects/javaSE/dest"));
    }    
}
------
package file;

import java.io.File;

public class demo {
    public static void main(String[] args) {
        findFile(new File("/home/yan/Documents"), ".pdf");
    }
    private static void findFile(File file,String ext){
        if(file==null)return;
        if(file.isDirectory()){//如果是目录
            File[] files = file.listFiles();//list全部的文件
            if (files!=null) {
                for (File f : files) {
                    findFile(f, ext);//递归调用
                }
            }
        }else{
            String name = file.getName().toLowerCase();
            if (name.endsWith(ext)) {
                System.out.println(file.getAbsolutePath());
            }
        }
    }
}

-------
package file;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * 输出流:OutputStream 对文件的输出流用子类FileOutputStream
 * 输入流:InputStream 对文件的输入流用子类FileInputStream
 */
public class bytedemo {
    public static void main(String[] args) {
        // out();
        in();
    }
    private static void out(){
        //先确认要操作的文件
        File f = new File("/home/yan/IdeaProjects/javaSE/test.txt");
        try {
            //append=true为添加,没有则会替换文件中内容
            OutputStream out = new FileOutputStream(f,true);
            //\r为换行,设置要输入的文字
            String info = "my fuck your is father!\r";
            //默认输入的为byte
            out.write(info.getBytes());
            //结束后关闭io
            out.close();
            System.out.println("success");
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    /**
     * input方法
     */
    private static void in(){
        File f1 = new File("/home/yan/IdeaProjects/javaSE/test.txt");
        try {
            InputStream in = new FileInputStream(f1);
            //如果改为1中文会乱码
            byte[] bytes = new byte[2];//单位是字节
            //设置一个可变字符串
            StringBuilder buf = new StringBuilder();
            int len = -1;//每次读取的长度
            while ((len=in.read(bytes))!=-1) {
                buf.append(new String(bytes,0,len));
            }
            //等效方法?
            // while ((len=in.read(bytes))!=-1) {
            //     String str = new String(bytes);
            //     System.out.println(str);
            // }
            System.out.println(buf);
            in.close();
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}
----------
package file;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;

/**
 * 字符流
 * 字符输入流:Writer ,使用子类FileWriter
 * 字符输出流: Reader ,使用子类FileReader
 * 每次使用的操作为 字符;
 */
public class charstream {
    public static void main(String[] args) {
        out();
        in();
    }
    private static void out() {
        File f = new File("/home/yan/IdeaProjects/javaSE/src/init.sh");
        try {
            Writer out = new FileWriter(f,true);
            out.write("小河流水哗啦啦!\r");
            out.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    private static void in() {
        File f = new File("/home/yan/IdeaProjects/javaSE/src/init.sh");
        try {
            Reader in = new FileReader(f);
            char[] cs = new char[1];
            int len = -1;
            StringBuilder str = new StringBuilder();
            while ((len=in.read(cs))!=-1) {
                str.append(new String(cs,0 ,len));
            }
            in.close();
            System.out.println(str);
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Guest-yan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值