1. 案例示例: package com.himi.trycatch; public class ExceptionDemo { public static void main(String[] args) { int a = 2; int b = 0; try { System.out.println(a / b); } catch (ArithmeticException ae) { System.out.println("除数不能为0"); } System.out.printl…
1. 可以参照之前写的笔记: Android(java)学习笔记167:Java中操作文件的类介绍(File + IO流) 2. FileOutputStream(常用的)构造方法: FileOutputStream(File file) Constructs a new FileOutputStream on the File file. FileOutputStream(String filename) Constructs a new FileO…