标签:exception integer str code except return rop turn col
import java.io.*; import java.util.Properties; public class PracticeUsed { public static void main(String[] args) throws IOException { Properties prop = new Properties(); File file = new File("count.ini"); if(!file.exists()) file.createNewFile(); FileInputStream fis = new FileInputStream(file); prop.load(fis); int count = 0; String value = prop.getProperty("time"); if(value!=null) { count = Integer.parseInt(value); if(count>=5) { System.out.println("您好,使用次数已到,拿钱!"); return; } } count++; prop.setProperty("time",count+""); FileOutputStream fos = new FileOutputStream(file); prop.store(fos,"haha"); fos.close(); fis.close(); } }
标签:exception integer str code except return rop turn col
原文地址:https://www.cnblogs.com/zxl1010/p/11654284.html